Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js isprome

function isPrime(n) {
    for(let i = 2; i < n; i++) {
        if (n % i === 0)
            return false;
        else
            continue;
    }
    return true;
}
 
PREVIOUS NEXT
Tagged: #js #isprome
ADD COMMENT
Topic
Name
1+4 =