Math.max(5,18,22,19,166, “200”)
returns the maximum number even if there is a string
Math.min(4,5,6,7,87,43)
returns the minimum amount in the list
Math.random()
generates a random number from 0.01 - 0.99
Math.trunc(number)
removes the decimals or fractions
Math.floor(number)
rounds to the lowest amount
Math.ceil(number)
rounds up to the highest amount
(number).toFixed(number)
rounds the decimals. Returns a string. Example: +(2.7).toFixed(2)
parseFloat and parseInt
Both extract numbers from strings. parse float returns number with decimals while parseInt returns integers
Math.pow(x, y)
returns the value of x to the power of y