T-seriesSucksAss M.

asked • 11/09/18

Hi am new to javascript and would like to know what I did wrong

var User = prompt('Pick Temp Username');



//Page always shows the Null message even if the user put something in the box


if (User =! null){


document.write('User didnt put username');

}

else {

document.write('Welcome, ' + User + ', I hope you enjoy your stay!');

}


1 Expert Answer

By:

Brian E. answered • 03/27/19

Tutor
4.9 (14)

Senior Full Stack JavaScript Developer (Node & React)

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.