JavaScript: Number.parseFloat
Number.parseFloat
is the value of the property key "parseFloat"
of
the Global Object.
console.log( Number.parseFloat === globalThis.parseFloat);
Syntax
Number.parseFloat(string)
-
Convert a string string (for example,
"3.14"
) to a decimal number.
// string to number console.log( parseFloat("324") === 324 );