WEB(웹)/javascript

Array.forEach()

SharingWorld 2018. 7. 29. 16:28

var Users = [{name: '소녀시대', age: 20}, ....];


Users.forEach(function(item, index) {

console.log('배열 요소 #' + index + ' : %s', item.name);

});