You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*By reusing the function rand10() created in last exercise, write a function named multiRand(n) that returns an array of n numbers between 1 and 10. You should not modify anything in rand10() to achieve this.
Write a documentation for the multiRand(n) function.
Use that function to create a program that will ask the number of random numbers to generate then display that same number of random numbers.*/
let numOfNums = prompt('enter how many random numbers you want to generate');
// ! as it is an arrow function, it has to be declared BEFORE being used/called
let multiRand = (n) => Array.from({length:n}, () => rand10());