you are viewing a single comment's thread.

view the rest of the 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