I'm a beginner in Javascript. I know the command .toFixed()
reduces the decimal places after the comma to the number you write in parenthesis. However, this command turns the number into a string, and so if we wanted to use that information as a number we'd need to use Number()
to turn that into a number.
Is there a command in JS that reduces the decimal places after the comma already returning a number value to us all in only one step?
Many thanks