toFixed method that returns a string version of the number rounded to the number of decimal places we passed in as the argument.
For instance, we can write:
const rounded = Number((6.6756854).toFixed(1)); console.log(rounded)
'6.7' since we passed in 1 to
This makes it returns a string rounded to 1 decimal place.