Ray Dunbar7,367 Points
Not getting second line to show correctly when previewing.
I am typing what is shown on screen but when I refresh the preview it will only show the name typed into the prompt and not "Hello". What am I missing?
var visitorName = prompt('What is your name?'); var message = "Hello " + visitorName; document.write(visitorName);
Steven Parker186,477 Points
The last line is writing the contents of "visitorName", but the combined string is in "message".