Function equal

Returns an array indicating whether each element of the input array is equal to a given value.

> equal([1, 2, 1, 3], 1)
[true, false, true, false]
  • Parameters

    • array: number[]

      The array of numbers to be compared.

    • value: number

      The value each element of the array is compared against.

    Returns boolean[]

    An array of booleans where each boolean indicates if the corresponding element in array is equal to value.