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) Creating Reusable Code with Functions Random Number Challenge Solution

My code doesn't return any value?!

Here's my code, but the console doesn't print anything?! Any ideas?

function randomParameter(minNum, maxNum){

return Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum; }

console.log( randomParameter( 5,10 ) );

console.log( randomParameter( 20,40 ) );

console.log( randomParameter( 10,100 ) );

console.log( randomParameter( 500,1000 ) );

1 Answer

Never mind, I found the issue. It's either bug of the launcher or the browser. The script works fine with other browsers.