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

Sonny Fishback
Sonny Fishback
7,257 Points

what am i doing wrong ?

i do not understand what is causing this error message

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

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 48,694 Points

You aren't logging 156. One fix is to change the condition to run to counter <= 156