Infinite loop


#1

Why does this give me an infinite loop??

var j=5
while(j=5) {console.log("I am the while loop");j=6;};


#2

@dataslayer73400,
In your WHILE-loop-condition you will have to use the comparison operator === or ==
in steat of the assignment operator =

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators


#3

Thanks a lot, I did not notice that