exa's notebooks

  • ES6 Arrow Functions - /exa/es6-arrow-functions
    Last edited 3 years ago
    Arrow functions (also known as fat arrow functions) have a shorter syntax compared to traditional function expressions and lexically bind the this value. Arrow functions are also always anonymous. Here we are using the shortest form, where the body is a simple expression and we can drop the parenthesis around the parameter since there is only one: