JS: Number.parseFloat

By Xah Lee. Date: . Last updated: .

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

Number.parseFloat === globalThis.parseFloat

Syntax

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