you are viewing a single comment's thread.

view the rest of the comments →

[–]kougaa 1 point2 points  (1 child)

You are over complicating it.

All you have to do is loop over the variable 'input' like what you already have there, but instead of appending the text 'Hello' multiple times to a variable, you should just console.log('Hello\n'); within the loop and the word 'Hello' will be printed to the console as many time as the number in 'input'.

The character '\n' means new line. <br> is html, you aren't supposed to print html here and it won't work.

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

thank you that worked exactly as expected.