When to 'while' and when to 'for'


#1

Page keeps crashing and I'm almost certain that there's something wrong in the "While loop" but i can't quite pinpoint what it is, can anyone help?

var loop = true;

while(loop) {
    console.log("damn son where'd you find this?");
    loop = false;
};

for (i=0; i<27; i=5) {
console.log(i);
}


#2

Hi it's your for loop

for (i=0; i<27; i=5) {
    console.log(i);
}

this part

i=5

you should do it like that

i +=5

or 

i = i + 5

#3

Ahh i see..Thanks alot!