let obj = {
key1: "value1",
key2: "value2",
key3: "value3"
}
for (let key in obj) {
let value = obj[key];
console.log(key, value);
}
// key1 value1
// key2 value2
// key3 value3
for (key in object) {
console.log(key,object[key]);
}
for (let key in person){
console.log(person[key]) }
Code Example |
---|
:: |
Javascript :: how to make a circle in p5js |
:: |
Javascript :: Create Your Own Node Module |
Javascript :: react bootstrap navbar align right buttons |
Javascript :: nuxtjs loading |
:: |
Javascript :: how to add two times in javascript |
Javascript :: window.location.search javascript |
Javascript :: |
Javascript :: |
:: |
:: |
Javascript :: swift encode json |
:: check if property exists javascript |
:: |
Javascript :: |
:: |
:: |
Javascript :: destructured object |
:: hoisting in javascript |
Javascript :: |
Javascript :: node fetch |
Javascript :: sort array based on multiple columns javascript |
Javascript :: |
:: |
Javascript :: |
Javascript :: take string until react |
Javascript :: javascript get cookie value one liner |
:: |