Foreach - iterate over array

    -1

    29

    Jose Romero

    TypeScript recipes

    The code looks for a function named "forEach" and calls it with the currentItem as its parameter. The forEach() function takes two parameters: an Array object and a callback function. The callback function will be called for every item in the Array object.

    Shortcut: for.each

    array.forEach((currentItem) => {});
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.