Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 71x 213x | /** * A function that checks if there is a value in the array that is NaN. * or if the input is a number it just checks if it is NaN. * @param input - The input to check if it is NaN. * @returns - True if the input is NaN, false otherwise. */ export default function hasNaNValues(input: number[] | number): boolean { Eif (Array.isArray(input)) { return input.some((value) => Number.isNaN(value)); } return Number.isNaN(input); } |