This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create array | |
const arr = []; | |
for(let i = 0;i < 10;i++){ | |
//Fill array with random values between 1 and 50 | |
arr.push(Math.floor(Math.random() * 50) + 1) | |
} | |
//Display array | |
console.log(arr) | |
//Prompt user for input | |
const num = prompt('Enter number') |
NewerOlder