• Returns whether all the given elements are true

    Parameters

    • Optionalvalues: (
          | undefined
          | null
          | string
          | number
          | boolean)[]

      the elements to check

    Returns boolean

    whether all the given elements are true

    allTrue([null, undefined]);    // false
    allTrue([null, true]); // false
    allTrue([true, true]); // true