-2

What is exactly the meaning of "=>" in javascript? it is used here for example. https://github.com/ebidel/polymer-gmail/blob/master/scripts/app.js

Emerson Bottero
  • 328
  • 5
  • 9

1 Answers1

1

=> called Arrow Function

An arrow function expression (also known as fat arrow function) has a shorter syntax compared to function expressions and lexically binds the this value (does not bind its own this, arguments, super, or new.target). Arrow functions are always anonymous.

For more information: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

Long Nguyen
  • 11,075
  • 2
  • 18
  • 25