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 trialBryan Becker
8,849 PointsError message isn't popping up
```function getRandomNumber ( lower, upper) { if ( isNaN (lower) || isNaN (upper) ) { throw new Error (' Both arguments must be numbers'); } return Math.floor(Math.random() * ( upper - lower + 1)) + lower; }
alert( getRandomNumber(5, 100) ); alert( getRandomNumber(5, 'twenty') ); alert( getRandomNumber('five', 50) );'''
I can't get the error message to pop up when entering a string.
Julian Gutierrez
19,201 PointsTo format your code properly checkout the "Markdown Cheatsheet" located below the content box when writing/editing your post.
Kai Nightmode
37,045 PointsYou can have pretty code with color coding if you start out with...
```javascript
Then on a new line, paste your code.
Finally, end with the following on another new line.
```
Try the "Markdown Cheatsheet" link for even more tips and tricks.
2 Answers
Julian Gutierrez
19,201 PointsI'm seeing the error on the console.
Bryan Becker
8,849 PointsThank you for the help!
Bryan Becker
8,849 PointsBryan Becker
8,849 PointsAlso how do I make my code pop up as code in a screen rather then the copy and paste look?