Is this creating infinite loop?


#1

Is this code creating infinite loop ?

https://www.codecademy.com/en/courses/javascript-beginner-en-ASGIv/2/3?curriculum_id=506324b3a7dffd00020bf661

var i = 1
var getToDaChoppa = function(){
  do {
    console.log("I am ok"); }
    while(i < 3);
    i ++; 
}; 

getToDaChoppa();


#2

HI the do while has this structure

do {
   #print something
   #increment
} while(condition);

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.