Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js loop through object

let obj = {name: "Mr X", sex: "Yes, 3 times a day"};
for (key in obj) {
	console.log(key, " ", obj[key])
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #loop #object
ADD COMMENT
Topic
Name
3+5 =