Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialjiwan gurung
4,248 Pointsdo u need to use single quotation for promt()?
do u need to use single quoation for prompt or u can use double quotation? i cant see why my prompt wont pop up a box?and also do you need to have space between variable name and = and promt?
var visitorname = promt('what is your name'); alert(visitorname);
2 Answers
Raja Kannan
6,590 PointsHi, jiwan gurung. You wrote the prompt spelling wrongly. That's why prompt dialogue box didn,t pop up. Try this: var visitorName = prompt('what is your name'); alert(visitorName);
jiwan gurung
4,248 Pointsthankyou so much.