Created
June 8, 2016 04:36
-
-
Save steveharoz/837317e07f2af5f950775b05b9b3d374 to your computer and use it in GitHub Desktop.
Weird context sensitivity in javascript 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
a = {number: 1}; // works | |
a = [1, 2, 3].map( n => 1 ); // works | |
a = [1, 2, 3].map( n => {number: 1} ); // unexpected ':' | |
a = [1, 2, 3].map( n => {return {number: 1};} ); // works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment