Created
May 23, 2020 05:28
-
-
Save hebertcisco/909d9929857d25108ab5f4217d174767 to your computer and use it in GitHub Desktop.
The for in loop interacts over an object's enumerated properties, in the original order of insertion. The loop can be performed for each distinct object property.
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 team = [ | |
{ | |
name: "John Doe", | |
occupation: "Web Design", | |
}, | |
{ | |
name: "Jane Doe", | |
occupation: "photographer", | |
}, | |
]; | |
for (let employee in team) { | |
console.log(team[employee]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment