Messages
Topics
Lists
Groups
Marketplace
Jobs
Norma Wyman
3 years ago
Use Array.from to create an empty array of the specific length. Use Math.random to generate random numbers and map them to the desired range, using Math.floor to make them integers.
#javascript
Generates an Array Of N Random integers In The Specified Range In JavaScript. Use Array.from to create an empty array of the specific length. Use Math.random to generate random numbers and map them to the desired range, using Math.floor to make them integers.