Problems with For Loop

Dear Freecodecamp community,
Good morning to you all,
I will thank you and appreciate your kind help in this exercise of For Loop.
I was trying to solve it but sadly it seems i am continue having problems in the part of the console.log , i am not pretty sure what to write there.

The problem asks me to create a For loop that logs the numbers 4 to 156 to the console.
To log a value to the console use the console.log( ) method.

This is what i ´ve done so far :

for (var i = 4 ;  i <=156 ;  i +=1){
console.log( " ");

Any orientation would be appreciate, thank you all in advance,

Kind regards,


Which variable can hold the value from 4 to 156 in your loop, that variable you have to pass as argument into console.log( ). Try to find out which variable hold value from 4 to 156

1 Like

for (var i = 4; i < 156; i++){
this should solve your problem

1 Like

Dear @Eldhose,
thank you so much for the fast reply, the variable is i , since i am declaring it in the condition of the loop, i was checking some other exercises and the solution was simple but i guess i was making the exercise bigger. I appreciate your kind help,
and i wish you a blessed day, thank you again !!!

1 Like

Dear @Dochi1,
thank you so much for the fast reply and kind help,
i appreciate it, i am so happy i arrived to the answer reflecting and reading some
other exercises, i wish you a Blessed day, and thank you so much again,
Kind regards,

Keep coding Dear Ivonne, in case any doubt, copy the tittle of challenge and past on YouTube serch. You get the answer with explaination. Keep a strong knowledge in JavaScript.

feel free to ask questions always.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.


1 Like

Dear @ArielLeslie ,
Good morning,
thank you , i am so sorry for forgetting to arrange it,
i will do it next time,
I wish you a Blessed day,
Kind regards,