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 trialSheldon Li
9,309 PointsNo pop-up box appears on my browser.
var input = prompt("Please type a number");
var topNumber = parseInt(input);
var randomNumber = Math.floor(Math.random() * topNumber) + 1;
var message = "<p>" + randomNumber + " is a number between 1 and " + topNumber + ".</p>";
document.write(message);
I've keyed in the codes above and previewed it on WorkSpace after saving.However there was no prompt box showing up. Is there anything to do with browser settings?
3 Answers
jason chan
31,009 Pointsit works for me. Clear browser history or try different browser.
akshaythakur
Courses Plus Student 34,019 PointsClose and re-open the tab. That should do the trick.
jason chan
31,009 PointsYes why?
Sheldon Li
9,309 PointsOh, nice to see you here! I heard your name from Fung Bros' rapping, "... Jason Chan , 626! ...". Lol
Sheldon Li
9,309 PointsSheldon Li
9,309 PointsClearing history worked.Thank you! By the way , are you JC who is from 626?