Functions and arrow functions
Two ways to write a function:
function add(a, b) {
return a + b;
}
const square = (n) => n * n; // arrow function, implicit return
Arrow functions are compact and common in modern code. Both are called the same way: add(2, 3).
Try it
Implement add and square so the program prints:
5
16