Home / Javascript Tips Generated By ChatGPT / Using Math.random to Generate Random Numbers in Javascript Math.random generates a random number between 0 (inclusive) and 1 (exclusive). Source Code console.log(Math.random());