liveBook · Manning

Variable declaration keyword

As explained in Secrets of the JavaScript Ninja, Second Edition

A JavaScript keyword used to declare a variable binding, such as var, let, or const.

JavaScript uses var, let, and const to declare variables. They differ in mutability and in their relationship to the lexical environment. section 5.5

The three declaration keywords are:

How Secrets of the JavaScript Ninja, Second Edition covers it

How deep it goes
Compares three declaration keywords by two properties: mutability and relationship to the lexical environment.
Examples
Names var, let, and const as the three declaration keywords.
What you can do after
Understand the comparison of var, let, and const by mutability and lexical-environment relationship.
How it connects
Connects variable declarations to lexical environments, closures, and scope.

Also explained in

Compare how 2 books explain variable declaration keyword →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secrets of the JavaScript Ninja, Second Edition. The section links point to the parts of the book it draws on.