Sunday, December 31, 2017

"For each" method of Javascript

"For each" method of Javascript.


        var some_array = ['aaa', 'bbb', 'ccc'];
        some_array.forEach(function(value, index) {
             console.log("index: " + index);
             console.log("value: " + value);
        });