ES6 Arrow Functions in JavaScript tutorial ( Fat Arrow Function Expression es2015, ecma6)




What is fat arrow functions, How different they are from regular function expressions in terms of syntax, scoping, and lexical this.

transpiler , typescript, ecma5, html5, latest javascript tutorial, shorter function

Original source


19 responses to “ES6 Arrow Functions in JavaScript tutorial ( Fat Arrow Function Expression es2015, ecma6)”

  1. For the setTimeout example, if instead of var xx=new x(); we do x(); this.value is recognized inside setTimeout function written just as above. Can you please explain why that is? Ideally this.value should not have been recognizable in function for setTimeout. To clarify, what I am saying is: https://jsfiddle.net/sa4nd3by/
    The answer is 2 instead of NaN like it should've been.

Leave a Reply