Function each

  • Iterate over Object properties or array elements.

    Parameters

    • obj: any

      Object, Array or null

    • callback: ((index, item) => boolean | void)

      called for every item. this also contains the item. Return false to stop the iteration.

        • (index, item): boolean | void
        • Parameters

          • index: string | number
          • item: any

          Returns boolean | void

    Returns any