Function isValidTimeArray

  • Checks if the given array is a valid time array. A valid time array should have exactly 4 elements, each representing hours, minutes, seconds, and milliseconds respectively.

    Parameters

    • array: number[]

      The array to be checked.

    Returns boolean

    A boolean indicating whether the array is a valid time array.

    Example

    isValidTimeArray([12, 30, 45, 500]); // returns true
    isValidTimeArray([12, 60, 45, 500]); // returns false

Generated using TypeDoc