Keywords

Programming languages consist of keywords and variables. A keyword is a language specific reserved term that has special meaning within the language. Keywords have pre-programmed set meanings. Variables do not have pre-programed meanings, and only have special meaning to the interpreter after being created and assigned by the programmer. We'll talk about variables in the next section.

Some JavaScript keywords include:

window
console
document
var, let, const
if, else, switch
for, while
function, return
class, extends, constructor, new

... and others.

With window, console, and document, the keywords are used to interact with the browser and it's information. In other cases keywords are used for clarifying and utilizing different parts of the language, such as declaring variables, objects, functions, conditionals, classes, etc.

Next