DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

Random — Example 177

Quick explanation + ready code for: Random.

Simula Random Back to examples
Back to language
Syntax: Random in Simula. ID: #177

Code

const x = Math.floor(Math.random()*100);
console.log("rand=", x);

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.