Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loop on an object

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

for (const key in obj){
console.log(key)
consol.log(obj[key])
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #loop #object
ADD COMMENT
Topic
Name
9+6 =