Scope decides where a variable can be used. This lesson shows one global value, one local value, and a function that combines them into a single label.
const siteName = 'Frontend Lab';
function buildLabel() {
const sectionName = 'Variables';
return `${siteName} - ${sectionName}`;
}
Use the global siteName inside your function.