finished isPrime.js