JavaScript executes inside the browser engine (such as Google V8). In modern ES6+, always declare variables with 'const' (for values that don't reassign) and 'let' (for values that change). Never use legacy 'var', which suffers from function-scope leakage and hoisting bugs.
Entity state & role in architecture: const appName
// Modern variable declaration
const appName = "ASCI Learning Engine";
const version = 3.5;
let activeUsers = 1250;
// Reassigning let
activeUsers += 1;
console.log(`App: ${appName} (v${version})`);
console.log(`Active Users Online: ${activeUsers}`);const appName = ...Creates a block-scoped identifier that cannot be reassigned.
let activeUsers = ...Creates a block-scoped variable that can be updated over time.
`App: ${appName}`ES6 Template Literal: embeds variables into strings with backticks.