parseInt() function converts
an integer into its string representation.
It reads the string and converts it
until it gets a character which cannot be
converted to a number.
In the example given below,
the string stored in the variable
the letters px.
stops reading the string
as soon as it gets to the letter p
returns 123 as the result.
When the string has a floating point number, the function ignores the numbers after the decimal point and returns the integer part of the number.
In the example give below, the function ignores 34 that comes after the decimal point.