æ¦è¦ ES2015ã象徴ããæ©è½ã§ãããã¢ãã¼é¢æ°æ§æã®å®è£ ãã¤ãã«V8ã§å§ã¾ã£ãã ç¡åé¢æ°ãçãæ¸ããããã[3.28.31] ã¢ãã¼é¢æ°ã¯ç¡åé¢æ°ã®çç¥è¨æ³ã§ããã ä»ã¾ã§ããæ¸ãã¦ããã®ãã var fn = function (a, b) { } ããã¹ãããªæ¸ããã var fn = (a, b) => { } ã=>ããç¢ã®ããã«è¦ãããã¨ãããã¢ãã¼ãé¢æ°ã¨è¨ãã æ´ã«çãã§ãã ãããã [1, 2, 3].map( function (v) { return v * v } ) // [1, 4, 9] ã¢ãã¼é¢æ°ã ã¨ãããªããã [1, 2, 3].map( (v) => { return v * v } ) // [1, 4, 9] å¼æ°ãä¸ã¤ã®æã«ã¯ã()ããçç¥ã§ããã®ã§ãããæ¸ããã [1, 2, 3].map( v => { return v * v } )
{{#tags}}- {{label}}
{{/tags}}