Mathematics in JavaScript: random Example