Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const ran = [];
- while (ran.length < 10) {
- x = Math.floor((Math.random() * 10) + 1);
- if (!ran.includes(x)) {
- ran.push(x);
- }
- }
- console.log(ran);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement