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 trialDiana Tiffany Bosso
3,188 PointsMy code is not running. Can someone explain to me why?
function randomNumber(upper) { return Math.floor( Math.random() * upper ) + 1; } var counter = 0; while ( counter < 100) { var randNum = randomNumber(6); document.write(randNum + " "); counter += 1; }
1 Answer
Jaspal Singh
13,525 Pointsits running successfully on my pc.
Diana Tiffany Bosso
3,188 PointsDiana Tiffany Bosso
3,188 PointsI have a mac it is the first time I'm having this kind of problem, but no matter what I do it won't run the code.