April 2018
Beginner
536 pages
13h 21m
English
Lambda expressions are just expressions that can be used to declare anonymous functions (functions without a name). Before the ES6 specification, the only way to assign a function as a value to a variable was using a function expression:
const log = function(arg: any) { console.log(arg); };
The ES6 specification introduced the arrow function syntax:
const log = (arg: any) => console.log(arg);