# Numbers

# Properties & Methods (opens new window)

❗️Floating point numbers cannot represent all decimals precisely in binary. This can lead to unexpected results, such as 0.1 + 0.2 === 0.3 returning false .

# Rounding


# String to Number


# Random

.Math.random() (opens new window)

returns a floating-point, pseudo-random number in the range 0 to less than 1

function random(min, max) {
    return Math.floor(Math.random() * (max + 1 - min)) + min;
}

or

random(min, max) => Math.floor(Math.random() * (max + 1 - min)) + min;

# Other Number-Methods (opens new window)