Created
December 5, 2014 02:00
-
-
Save roine/7b0df2c5dcc56278314a to your computer and use it in GitHub Desktop.
Notes on ES6
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
var numbers = ['a', 'b', 'c']; | |
for(let i of numbers){ | |
console.log(i); // a b c | |
} | |
var users = [{ | |
firstname: 'jon', | |
lastname: 'dem' | |
}, | |
{ | |
firstname: 'sophie', | |
lastname: 'wang' | |
}]; | |
for({firstname} of users){ | |
console.log(firstname); //jon wang | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment