0

what is wrong with this code?

var name=prompt("please enter your name") var age=prompt("please enter your age") document.write("Hi "+name+" you are "+day+" years old") var day=365*age It says "hi "name" you are undentefide years old" when its coded to say "hi "name" you are "day" years old"

22nd Oct 2017, 4:44 PM
<p>GENTRY<p>
<p>GENTRY<p> - avatar
3 Answers
+ 3
Yes, but you're also missing semicolons after each of your statements. var name = prompt("please enter your name"); var age = prompt("please enter your age"); var day=365*age; document.write("Hi "+name+" you are "+day+" years old");
22nd Oct 2017, 4:56 PM
ChaoticDawg
ChaoticDawg - avatar
+ 1
Okay! Thanks!šŸ˜ƒ
22nd Oct 2017, 4:57 PM
<p>GENTRY<p>
<p>GENTRY<p> - avatar
0
var name=prompt("please enter your name") var age=prompt("please enter your age") var day=365*age; document.write("Hi "+name+" you are "+day+" days old") Wait is this right?
22nd Oct 2017, 4:50 PM
<p>GENTRY<p>
<p>GENTRY<p> - avatar