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 trial

JavaScript JavaScript Basics (Retired) Working With Numbers The Random Challenge

1 Answer

Code seems fine in the random.js file but in the html file it seems that the placement of the script tag is incorrect. Mine worked if you drop the script just above the closing body tag and below the closing div tag.

sebbe12
sebbe12
4,015 Points

I didn't touch the html file it is as default. When I run the code it works and I get a random number.

yep sorry about that I guess I just needed to reload but at first it gave an error which was weird. Either way good job looks like it was all good to begin with.