DEV Community

Discussion on: Understanding the Spread Operator in JavaScript

Collapse
 
qm3ster profile image
Mihail Malo • Edited
const randoms = function*(x){while(true)yield Math.random()*x|0}
const [a, b, c] = randoms (1000)
console.log(a, b, c)

open eye crying laughing emoji