Created
June 15, 2022 12:56
-
-
Save Octagon-simon/a7ee3aec476aca4f36148601e1fa5f69 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const profile = { | |
| name : "Simon", | |
| email: "me@you.com", | |
| gender : "male" | |
| } | |
| //loop through keys | |
| Object.keys(profile).forEach( (key) => { | |
| //access object value using key | |
| console.log( key+' = '+profile[key] ); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment