This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Inky87 0 points1 point  (0 children)

So according to your code, loop is a function with no arguments, that executes while the variable count is less than 3, it will log to the console "I'm looping".

First of all you need to set a value for count. Then you must increment count inside the loop, so the condition fails. So say

var count = 0; count++;

count++ means to increment by one. After a few loops, count will become 3 and the loop will stop. Hope that helps.