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

Maxim Gasan
Maxim Gasan
3,271 Points

I think the challenge itself is not so accurate,because...

For example, let's take the first challenge.

He asked us to create a random number between 1 and user's number,and then he uses Math.floor which excludes "all" numbers,I am talking about float one's, because then it become a little bit more difficult to resolve the task. Am I right, or did I get it wrong?

(clearly he said numbers in the task,and didn't mentioned any float numbers,so may be I made it more difficult for myself)

2 Answers

Steven Parker
Steven Parker
229,982 Points

You forgot to include a link to the challenge so I could check, but I'm sure what they meant to say was "create a random integer ...". Then Math.floor is perfect for the task because it converts floats into integers.

Steven Parker
Steven Parker
229,982 Points

I'm still sure he meant to say "integer", unless somewhere earlier in the course he said he was going to use the word "number" to mean "integer".

But if not, you might want to report this as a bug to Support.