Answers for "how to loop over an object and get the values back"

4

javascript loop through object values

var myObj = {foo: "bar", baz: "baz"};
Object.values(myObj).map((val) => {
console.log(val);
})
// "bar" "baz"
Posted by: Guest on June-11-2020

Code answers related to "how to loop over an object and get the values back"

Code answers related to "Javascript"

Browse Popular Code Answers by Language