JavaScript: Number.parseFloat

By Xah Lee. Date: . Last updated: .

Number.parseFloat is the value of the property key "parseFloat" of the Global Object.

console.log( Number.parseFloat === globalThis.parseFloat); // true

Syntax

Number.parseFloat(string)
Convert a string string (for example, "3.14") to a decimal number.
// string to number
console.log(
 parseFloat("324") === 324
);
// true
BUY
ΣJS
JavaScript in Depth

JS Obj Reference

Number

prototype