Coderwall
Ruby
Python
JavaScript
Front-End
Tools
iOS
More
Tips
Ruby
Python
JavaScript
Front-End
Tools
iOS
PHP
Android
.NET
Java
Jobs
Jobs
Sign In or Up
Joined March 2015
·
amir-s
Amir Saboury
Montreal, QC
·
·
0 Protips
1 Comments
Posted to
Shortest code for random number between 1 and N in JavaScript
over 1 year ago
Math.random()
return a random number between 0 (inclusive) and 1 (exclusive).
Achievements
1 Karma
0 Total ProTip Views
Interests & Skills
javascript
nodejs
c++
c
mysql
php
java
python
graphic design
photoshop
web design
HTML
CSS
noSql
Math.random()
return a random number between 0 (inclusive) and 1 (exclusive).