Keywords and Identifiers in JavaScript
Keywords are reserved words — let, const, function, class, if, return, import, and about forty others — permanently owned by the language and never usable as names. A few (like await, yield, enum) are reserved for future or strict-mode use. Identifiers are the names you invent: they must start with a letter, underscore, or dollar sign, followed by letters, digits, underscores, or dollar signs.
JavaScript is case-sensitive (total vs Total differ), and convention is strong: camelCase for variables and functions, PascalCase for classes, SCREAMING_SNAKE_CASE for constants — enforced by linters, not the compiler.
What counts as a keyword
Fixed reserved words (let, new, typeof, delete, ...) that always mean the same thing and can never name a variable.
What counts as an identifier
Any invented name starting with a letter, _, or $, continuing with letters, digits, _, $ — $ is legal (jQuery's fame) though uncommon in new code.
Case sensitivity
count, Count, and COUNT are three different bindings — capitalization is never ignored.
Convention over enforcement
camelCase variables, PascalCase classes, UPPER constants — universal style guides the compiler never checks.
let userCount = 42;let UserCount = 7;const MAX_USERS = 100;console.log(userCount, UserCount, MAX_USERS);Recommended resourcesAffiliate links · may earn us a commission
Recommended for learners
Practice what you learned
Re-implement each visualized algorithm in JavaScript yourself — building beats watching.