Global variable
Variable visible throughout the program. Classic anti-pattern in modern programming — breaks encapsulation, makes testing + concurrency hard.
JavaScript: window.X (browser) or global.X (Node). Python: variables at top-level module. C: variables outside functions. Modern alternatives: dependency injection, module export, singleton pattern (controversial — better than global, but not by much). Globals live on in: config constants, loggers, runtime feature flags. const globals are OK; mutable globals are the problem. JS strict mode + ES modules eliminate accidental global creation. Webpack/bundlers warn for window injection.