JSchallenger

Return the next higher prime number

Viewed: 412
Attempted: 238
Solved: 23
// This challenge is a little bit more complex
// Write a function that takes a number as argument
// If the number is prime, return the number
// If not, return the next higher prime number
//

function myFunction() {

return
}
Test Cases:
myFunction(38)
Expected
41
myFunction(7)
Expected
7
myFunction(115)
Expected
127
myFunction(2000)
Expected
2003