Question: A junior programmer comes to you with some code that appears not to work. Can you spot where he went wrong? Give him a hand
A junior programmer comes to you with some code that appears not to work. Can you spot where he went wrong? Give him a hand and correct the mistakes.
var userAge = prompt("Please enter your age");
if (userAge = 0) {; alert ("So you're a baby!"); } else if (userAge < 0 | userAge > 200) alert("I think you may be lying about your age"); else { alert ("That's a good age"); }
Step by Step Solution
3.36 Rating (162 Votes )
There are 3 Steps involved in it
Oh dear our junior programmer is having a bad day There are two mistake... View full answer
Get step-by-step solutions from verified subject matter experts
