Created
June 30, 2023 11:14
-
-
Save Polkovn1k/8fe4c529536c9bbdf25f050c7e6d1198 to your computer and use it in GitHub Desktop.
Object iterating (js)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let person = { | |
firstName: 'John', | |
lastName: 'Doe', | |
age: 25, | |
ssn: '123-456-2356' | |
}; | |
Object.keys(person).forEach(key => { | |
console.log(`${key}: ${person[key]}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment