Skip to content

Arrow functions

Arrow functions

  • A shorter way to write a function: const square = (n) => n * n;.
  • With a single expression after =>, the value is returned automatically — no return, no { }.

The same function written two ways: the long form, and the short arrow form

Log in or create account

IGCSE & A-Level