Top "Arrow-functions" questions

Questions about the compact function syntax in ECMAScript2015 (ES6) called "arrow functions" because of their use of "=>".

CoffeeScript, When to use fat arrow (=>) over arrow (->) and vice versa

When building a class in CoffeeScript, should all the instance method be defined using the => ("fat arrow") operator and …

coffeescript arrow-functions
Passing parameters to a callback function using arrow function

I know this is a duplicated question with ES5, but I am looking for the syntax with ES6 arrow function. …

javascript ecmascript-6 arrow-functions
Arrow Function in Object Literal

I'm trying to figure out why an arrow function in an object literal is called with window as this. Can …

javascript ecmascript-6 babeljs object-literal arrow-functions
How do I write an arrow function in ES6 recursively?

Arrow functions in ES6 do not have an arguments property and therefore arguments.callee will not work and would anyway …

javascript recursion ecmascript-6 arrow-functions
Arrow function without curly braces

I'm new to both ES6 and React and I keep seeing arrow functions. Why is it that some arrow functions …

javascript reactjs ecmascript-6 arrow-functions
Access variables declared a component from a RxJS subscribe() function

I am able to use this.variable to access variables in any part of the component, except inside RxJS functions …

javascript angular typescript rxjs arrow-functions
async function or async => when exporting default?

export default async function () { }; or export default async () => { }; Which one is preferred when exporting a default function and why?

javascript node.js async-await arrow-functions es6-modules
How to return anonymous object from one liner arrow function in javascript?

I recently switched to es6 and started using arrow functions all over my code. While refactoring I came across below …

javascript ecmascript-6 arrow-functions
Resolving promises from ES6 Arrow Functions

Reading the docs as I understand it in ES6 the meaning of: foo => someFun(foo); is equivalent to: foo =&…

javascript ecmascript-6 es6-promise arrow-functions
What does "this" refer to in arrow functions in ES6?

I've read in several places that the key difference is that this is lexically bound in arrow functions. That's all …

javascript this ecmascript-6 arrow-functions