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"
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");
+ 1
Okay! Thanks!š
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?