Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js iterate object

let obj = {
  key1: "value1",
  key2: "value2",
  key3: "value3"}

for(const key in obj){
  console.log(obj[key])
}

//result
// value1
// value2
// value3
 
PREVIOUS NEXT
Tagged: #js #iterate #object
ADD COMMENT
Topic
Name
3+9 =