Arrow functions – also called “fat arrow” functions.
Arrow functions allow us to write the short syntax for function expressions.
Arrow function is not redefining this keyword or execution context
Click here to learn more about this keyword
return keyword required when the statements are in curly brackets.
Arrow function is not redefining this keyword or execution context
Click here to learn more about this keyword
// ES5
var x = function(x, y) { return x * y; }
// ES6
const x = (x, y) => x * y;
return keyword required when the statements are in curly brackets.
const x = (x, y) => { return x * y};Read also:
- Top features in ES 6 / Javascript 2015
- this keyword in Javascript
- Block scope variables in ES6
- HTML5 Web Storage
- Sorting an array in Javascript
- What is Redux? Why we need Redux? When it is required?
- React - Redux with Example
Comments
Post a Comment