Skip to content

Instantly share code, notes, and snippets.

View Oluwa-nifemi's full-sized avatar

Oluwanifemi Adeyemi Oluwa-nifemi

View GitHub Profile
@Oluwa-nifemi
Oluwa-nifemi / random.js
Created February 15, 2019 22:53
Solution to DSC Unilag random number generator and counter challenge
//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')