Skip to content

Latest commit

 

History

History

24-arrow-functions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Lesson 24: Arrow functions

Concise function syntax with lexical this.

What you'll learn

  • (a, b) => a + b — implicit return for single expressions
  • x => x * 2 — single param needs no parens
  • () => { ... } — block body needs explicit return
  • arrows have no own this, arguments, or new

Example

See examples/.

Exercise

Convert 3 regular functions to arrow functions.