A street with cars parked in both sides

ES6: the keyword let in examples

The keyword let allows us creating block scopes in JavaScript. Let’s see some examples.

Block scope

Using var.

Using let.

Loops

Using var.

Using let.

Duplidated variables

Using var.

Using let.

Here you can find an JS Bin with the examples.

See all posts...