Global Scope
The outermost scope, whose declarations may be available across a script or module.
What is Global Scope in JavaScript?
Global Scope — The outermost scope, whose declarations may be available across a script or module.
const taxRate = 0.08;
function addTax(price) {
const tax = price * taxRate;
return price + tax;
}
Level: Apprentice · More JavaScript terms at this level
Updated