Function

A reusable block of code that can receive values and return a result.

What is Function in JavaScript?

Function — A reusable block of code that can receive values and return a result.

function total(price, quantity) {
    return price * quantity;
}

Level: Apprentice · More JavaScript terms at this level

Updated