JavaScript 004 – parseInt & NaN

In JavaScript, a variable can hold any data type. Sometimes, we need to convert the string representation of a number to an integer or float. For example, data submitted by web form comes in string format, even user entered the data in number format. We can say an age submitted by the user comes as a string. JavaScript, need to convert this as a number. Once data is converted to a number, it can involve in mathematical expressions