-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
  • 298
  • 5
  • 7

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
  • 9,595
  • 2
  • 15
  • 24