parseFloatintermediate// Parse a string to a floating-point number
Number.parseFloat('3.14') // β 3.14
Number.parseFloat('3.14abc') // β 3.14 (stops at first non-numeric)
Number.parseFloat('abc') // β NaNUse Number.parseFloat() to convert a string to a decimal number, stopping at the first character that is not part of a valid number.
'3.14.15' parses as 3.14 β the second decimal point stops parsing.