let and const
var to declare variables.
In ES6, there are two additional ways to declare variables:
const. A variable declared with
const cannot be reassigned; that is to say, the following is invalid:
Variables declared with
var may be reassigned. A variable declared with
let may only be used in the same block as it is defined.
Some of the examples in this book still use
var, but you’ll also see
const. Don’t worry about the distinctions too much.
require to import other modules, and assign a value to
module.exports in order to make a file’s ...