Answers for "foreach woth object.entries"

0

for each element in object

var obj = {
  first: "John",
  last: "Doe"
};

//
//	Visit non-inherited enumerable keys
//
Object.keys(obj).forEach(function(key) {

  console.log(key, obj[key]);

});
Posted by: Guest on February-02-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language