## 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.

# Generating random number between x and y or generating random number from x to y ?

Mr Dave said to generate random number between x and y, but why the solution include x and y? If it were between shouldn't it excludes x and y, or in other words :

x < random number < y

So the formula should be this..

Math.floor ( Math.random * ( y - x - 1 ) )+ ( x + 1 );

if He uses the formula written in the random.js workspace, it means generating random number from x to y or in other words, x <=random number <= y

Please correct me if I am wrong....