How do you do random?

I was watching a VueJS tutorial and was surprised at what it takes in ECMAscript to generate a random integer between 0 and 10.

Math.floor(Math.random() * 10);

In PHP it takes

mt_rand(0, 10);

If your favorite language what does it take to generate an integer between 0 and 10?