1'use strict';
2// ECMAScript 2017
3const object = {'a': 1, 'b': 2, 'c' : 3};
4for (const [key, value] of Object.entries(object)) {
5 console.log(key, value);
6}
1var person={
2 first_name:"johnny",
3 last_name: "johnson",
4 phone:"703-3424-1111"
5};
6for (var property in person) {
7 console.log(property,":",person[property]);
8}
1for (const [key, value] of Object.entries(object1)) {
2 console.log(`${key}: ${value}`);
3}
4
1const fruits = { apple: 28, orange: 17 }
2
3for(key in fruits){
4 console.log(key)
5}