Welcome to the Treehouse Community
Looking to learn something new?
Kjetil-Lennart A. Lorentzen13,390 Points
Struggeling with the math. Help.
I am seriously struggeling with the math, i thought i understood it when i encountered it in the course. but you know what? I don't.
This is the only thing that made this challange hard for me, i didn't know where to put the lower and upper.
Can somebody please explain the math to me like i am a 5 year old?
`Math.random() returns a random number between 0 (inclusive), and 1 (exclusive): Math.random(); // returns a random number
Math.round() Math.round(x) returns the value of x rounded to its nearest integer: Example Math.round(4.7); // returns 5 Math.round(4.4); // returns 4
Math.ceil() Math.ceil(x) returns the value of x rounded up to its nearest integer: Example Math.ceil(4.4); // returns 5
Math.floor() Math.floor(x) returns the value of x rounded down to its nearest integer: Example Math.floor(4.7); // returns 4