var is the original JavaScript keyword for declaring a variable. It is function-scoped — meaning the variable is accessible throughout the entire function in which it is declared, regardless of block boundaries. var declarations are also hoisted: the declaration is moved to the top of its scope at runtime, though the assigned value is not. Introduced with JavaScript in 1995, var remained the only variable declaration until ES6 introduced let and const in 2015.
Origin
Short for variable. The keyword appeared in Brendan Eich's original 1995 JavaScript implementation at Netscape, itself influenced by Java, C, and Scheme. The three-letter abbreviation was chosen for brevity and became one of the most typed words in the history of programming. Despite its age, var is still valid JavaScript in every browser and runtime environment.
⚠ Google UK English voice unavailable. Transcript shown. Use Google Chrome for audio.
Ready
🎧 Podcast 2 — Daily Use
var in Conversation
Two British speakers · Developer everyday dialogue
⚠ Google UK English voices unavailable. Transcript shown. Use Google Chrome for audio.
Ready
⚙ Podcast 3 — Prompt Engineering
var — AI Prompts
Practical prompt cards · Copy & read aloud
⚠ Google UK English voices unavailable. Transcript shown. Use Google Chrome for audio.