liveBook · Manning

Lambda

As explained in Secrets of the JavaScript Ninja, Second Edition

A function that has no name.

A lambda, also called an arrow function in JavaScript, is a compact way to define a function value. section 3.3

myArg => myArg*2

This one-argument arrow function doubles its input. section 3.3

How Secrets of the JavaScript Ninja, Second Edition covers it

How deep it goes
Introduces ES6 arrow syntax and flags a callback-related benefit, while deferring its explanation.
Examples
Uses `myArg => myArg*2` to show a one-argument arrow function doubling its input.
What you can do after
Build a concise arrow function using the form `myArg => myArg*2`.
How it connects
Connects arrow functions to JavaScript function literals, first-class function values, and callback functions.

Also explained in

Compare how 18 books explain lambda →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secrets of the JavaScript Ninja, Second Edition. The section links point to the parts of the book it draws on.