Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 442 Bytes

check-all-prime-in-array.md

File metadata and controls

12 lines (10 loc) · 442 Bytes

Given an array of numbers , write a function that checks if all the numbers in the array are prime or not. If all the numbers are prime the function returns true, otherwise it returns false.

Note: You have to reuse the Check Prime function we created earlier

// Copy your checkPrime function here

function checkAllPrime(arr){
}
console.log(checkAllPrime([5,11,7,29,2]));// true
console.log(checkAllPrime([5,11,77,29,2]));// false