Return Value
noun
say it: “rih-TURN VAL-yoo” /rɪˈtɜːrn ˈvæljuː/
The result a function hands back to the code that called it, using the return keyword.
What is Return Value in JavaScript?
Return Value — The result a function hands back with return.
function total(price, quantity) {
return price * quantity;
}
const orderTotal = total(4, 3);
In a sentence
- “The return value of addTip(20) is 23, which I stored in a variable called total.”
Level: Apprentice · More JavaScript terms at this level
Updated