Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 266 Bytes

File metadata and controls

17 lines (12 loc) · 266 Bytes

defination

        The forEach calls a provides function for each element in an array.

example

    var num = [2, 1, 4, 5];
    num.forEach(function (name) {
    console.log(name);
    });

output

    2
    1
    4
    5