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.
3 Comments
Sort: