[DONE] What Am I Doing Wrong? 11/11


#1

for (var i = 1; i < 10; i++){
console.log(i);
}

var count = 0;
while(count < 10) {
console.log("Keep Countin'!");
count++;
count=false;
};

var count = 0
do {
console.log("I'm printed once!");
count++;
} while(count < 1);

//What Am I Doing Wrong?


#2
var count = 0;
while(count < 10) {
console.log("Keep Countin'!");
count++;
count=false;
};

false has a numerical value of 0 so your cycle goes:

count is 0
check condition
increase count by 1
set count to false
check condition
increase count by 1
set count to false
check condition
increase count by 1
set count to false
check condition
...

So your trapped in an infinite loop here. Why do you want to set it to false in the first place?


#3

It Was The Closest Code To Getting Through 11/11