Hanane LadjFront End Web Development Techdegree Student 12,773 Points
Next, declare a new variable named tempRoundDown. Assign it the temperature variable rounded downward to the nearest int
would anyone help me with this challenge?
const temperature = 37.5; let tempRounded = Math.round(temperature); let tempRoundDown = Math.fround(tempRounded);
Hey Hanane Ladj,
For the second challenge, you need to use
Math.floor method and assign it the
temperature variable instead of
Here's the final code for the second challenge:
const temperature = 37.5; let tempRoundDown = Math.floor(temperature);
To learn more about
Math.floor() method, check out this website: https://www.w3schools.com/jsref/jsref_floor.asp
Hope this helps!