Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js loop through object

const obj = { a: 1, b: 2, c: 3 }

for (const [key, value] of Object.entries(obj)) {
	console.log(key, value)
}
Source by bolajiayodeji.com #
 
PREVIOUS NEXT
Tagged: #js #loop #object
ADD COMMENT
Topic
Name
5+4 =