JavaScript only has one data type for numbers, both integers and decimals twoDecimalPlaces. Sometimes you might end up with a number that is stored as a string type, which makes it difficult to perform calculations with it. This most commonly happens when data is entered into a form input, and the input type is text.

2m read timeFrom developer.mozilla.org
Post cover image
3 Comments

Sort: