Created
September 10, 2017 03:37
-
-
Save StevenJL/b4f2de0116f24d5814e31e3f18e04f61 to your computer and use it in GitHub Desktop.
Arrow
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
// before ES6 | |
var numbers = [1,2,3,4,5,6]; | |
var even_numbers = numbers.filter(function(x) { return x%2 === 0 }) | |
// with ES6 | |
const numbers = [1,2,3,4,5,6]; | |
const even_numbers = numbers.filter(x => x%2 === 0 }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment