javascript get random floating number
snippet in javascript

javascript get random floating number

user3763

const randomFloat = (min, max) => Math.random() * (max - min) + min;

random function javascript

user5488

let object = random(0, 50);
// making "object" a random number between 0 and 50.

console.log(object);
// printing object in the console