Hello @board1774168228! This rounds down the variable
fahrenheit, and stores that to
Math object is a static object, meaning that all methods within it are called on the class itself (
Math), as opposed to an instance of that class. Take
Math.floor(). The method
.floor() rounds a number down, however, you call this method on the
Math object itself, rather than calling it on an instance of the
In other words, you provide a number as a parameter for the method, instead of directly calling the method on the integer.
let a = Math.floor(3.5);
//when we call the method floor, we are calling it on the class itself
//(Math), and provide a parameter 3.5.
To provide contrast, take the
.push() method (which pushed a value onto a list):
//an example of .push():
let a = [1, 2, 3, 4, 5];//list of integers
a.push(6);//pushes 6 onto the end of the list a
//a is now [1, 2, 3, 4, 5, 6]
.push() method acts on an instance of the list class (in this case, the variable
Math more, and this describes what static class are more.
I hope this helps!