
Arrow Functions Basics
JavaScript arrow functions let you write the same functions you already know in fewer lines. The idea isn't new—only the syntax is shorter.
Read tutorialDefining, calling, composing, and understanding reusable JavaScript functions and their behavior.
Tagged articles
10 articles in this tag.

JavaScript arrow functions let you write the same functions you already know in fewer lines. The idea isn't new—only the syntax is shorter.
Read tutorial
There is a small magic moment in every beginner programmer's life: the first time a page changes itself, with no click, no refresh, no input from you. The…
Read tutorial
You have definitely seen a modal before. You clicked a button on a website, and a small window appeared on top of the page. Everything behind it went dark.…
Read tutorial
A function that always does the same thing is a dead end. A function that can accept input and hand back a result becomes a tool you can reuse anywhere.
Read tutorial
Copying and pasting the same code over and over works for a while—until you need to change something and suddenly have to hunt through ten copies of the…
Read tutorial
A function can outlive the variables it was born next to. That sentence sounds wrong until you run it.
Read tutorial
You write a variable inside a function, log it, and it prints perfectly. You move that same console.log two lines down, outside the function, and suddenly…
Read tutorial
You copy a method into a new variable, call it, and get undefined instead of the name you expected. Nothing in the object changed. Nothing in the function…
Read tutorial
That is the normal first experience with recursion. The function calls itself, the answer appears, and somewhere in the middle your mental model goes dark.…
Read tutorial
Reading about functions feels clear. Writing one from scratch feels different. That gap is normal—and it closes the same way for everyone: by running code,…
Read tutorial