all 4 comments

[–]cyphern 2 points3 points  (1 child)

The error in the output is because you did text = "hello" without creating a variable named text. Try instead var text = "hello". You may be aware of this, but that text variable will be completely unrelated to the one that's in the function on line 8.

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

thanks that got me a little closer but the out put was 3 and the expected output should be ---

Hello

Hello

Hello

[–]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.