WitzCode
← All tracks
⚡ JavaScript·Functions

Functions

Reusable blocks of behaviour.

Functions

function add(a, b) { return a + b; }
const double = (n) => n * 2;
Challenge 1 / 20 XP

What does a function without `return` give back?

Practical task

Write a function `add` that returns the sum of `a` and `b`.