Parameter
noun
say it: “puh-RAM-ih-ter” /pəˈræmɪtər/ or “puh-RAM-uh-ter” /pəˈræmɪtər/
A name in a JavaScript function's parentheses that stands for a value the function will be given when it's called.
What is Parameter in JavaScript?
Parameter — A name in a function definition for a value the function needs.
function total(price, quantity) {
return price * quantity;
}
const orderTotal = total(4, 3);
In a sentence
- “The parameter drinkName lets one greet function work for any drink on the menu.”
- “The function describePet(pet) has one parameter, pet, and it holds whichever pet I pass in.”
Level: Apprentice · More JavaScript terms at this level
Updated