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

WHATT ??????

look i know the 160 is wrong but i tried 156 and it said that i was calling the console.log() function 152 times which is stupid and doesnt make sense but im sure ill figure it out in lie 30 seconds after i post this

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

1 Answer

Martin Jones
Martin Jones
Front End Web Development Techdegree Graduate 41,151 Points

Don't forget to add the equals sign after the less than in the comparison, so it will look like that below:

for (var x = 4; x <= 156; x++) {
console.log(x);
}