Function isEven

  • Checks if a number is even.

    Parameters

    • n: number

      The number to check.

    Returns boolean

    A boolean indicating whether the number is even.

    Remarks

    This function will throw an error if the provided value is not an integer.

    Throws

    Will throw an error if the provided value is not an integer.

    Example

    isEven(2);
    //=> true
    isEven(3);
    //=> false

Generated using TypeDoc