Scope
Where in the code a variable can be used.
What is Scope in JavaScript?
Scope — Where in the code a variable can be used.
const taxRate = 0.08;
function addTax(price) {
const tax = price * taxRate;
return price + tax;
}
Level: Apprentice · More JavaScript terms at this level
Updated