Function isArray

  • Checks if the input is an array.

    Parameters

    • arr: unknown

      The input to be checked if it is an array.

    Returns boolean

    true if the input is an array, false otherwise.

    Example

    const arr1 = [1, 2, 3];
    const arr2 = 'not an array';

    console.log(isArray(arr1)); // true
    console.log(isArray(arr2)); // false

Generated using TypeDoc