Functions are blocks of code that only run when you call them. They can accept parameters and return a value.
javascript
// Function definition
function add(a, b) {
return a + b;
}
// Calling the function
let sum = add(5, 7);
console.log("The sum is: " + sum);You should see
The sum is: 12