Use return to send a value back from a function:
function add(a, b) {
return a + b
}
let result = add(5, 3)
console.log(result) // 8
// Use directly in expressions
console.log(add(10, 20) * 2) // 60
The returned value replaces the function call in the expression. You can store it, use it, or ignore it.