Skip to content

JS Floats

Syntax

Floats in JavaScript are numbers with a decimal point and are used to represent non-integer values.

let floatNumber = 1.23; // Declares a float value
let decimal = 0.15; // With leading zero
let otherDecimal = .15; // Without leading zero