forEach()

areUndefined().forEach()

The forEach() method executes a provided callback function once for each element of the supplied values of areUndefined().

The method uses forEach() method of areDeterminer().

Example usage

// Example usage.
import { areUndefined } from '@angular-package/type';

areUndefined(undefined, 1, 2, '3').forEach(
  (result, value, index, array, payload) => {
    result // true, false, false, false
    value // undefined, 1, 2, '3'
    index // 0, 1, 2, 3
    payload //  { age: 2 }
    array // [ undefined, 1, 2, '3' ]

    if (result === true) {
      // if undefined do something.
    }
  },
  { age: 2 }
);

Last updated