```js
function isPrime(n) {

    if (n == 1 ) {
        return (`${n} is niether a prime number nor composite number`)
    }
    else if( n < 1){
        return (`${n} is not a prime number`)
    }
    else{
        for (let i = 2;  i < n; i++) {
            if( n % 2 == 0){
                return result = `${n} is not a prime number`
                break;
            }
            else{
                return result = `${n} is a prime number`
            }
        }
    }
}

console.log(isPrime(15))

```

I write a function to find the prime number , but it's not working because I'm not able to break the loop