JavaScript JavaScript Loops, Arrays and Objects Simplify Repetitive Tasks with Loops Create a for Loop

Create a for loop that numbers from 4 to 156 to the console.log file.To log in use the console.log ( ) method.

create a for loop that numbers from 4 to 156 to the console.log

script.js
for ( var i = 156; i < 4; i++ ) {
  console.log ( i );
}

1 Answer

Mark Truitt
Mark Truitt
8,758 Points

You are very close to answering this on your own. Look at the value you are setting for i and how its checking. You have the logic backwards.