codetrix - v1.5.0
    Preparing search index...

    Function isPrime

    • Checks if a number is a prime number.

      Parameters

      • num: number

        The number to check.

      Returns boolean

      true if the number is prime, otherwise false.

      isPrime(7); // true
      isPrime(10); // false