Local Scope
A function or block scope where declarations are available only inside that area.
What is Local Scope in JavaScript?
Local Scope — A function or block scope where declarations are available only inside that area.
const taxRate = 0.08;
function addTax(price) {
const tax = price * taxRate;
return price + tax;
}
Level: Apprentice · More JavaScript terms at this level
Updated