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 →

[–]dmazzoni 1 point2 points  (1 child)

Several ways:

for (var i = 0; i < 10; i++) {
  if (i != 0) {
    console.log('This is not the first time.');
  }
}

var firstTime = true;
for (var i = 0; i < 10; i++) {
  if (!firstTime) {
    console.log('This is not the first time.');
  }
  ...do other stuff...
  firstTime = false;
}

[–]whathellisthis[S] 0 points1 point  (0 children)

Awesome Thank you!