JavaScript var const and let

Signification and let are new JavaScript methods of declaring a variables on modern browser's you don't need to enable strict mode to make use of const, and let

What's the difference between var , let and const
Immutability when you declare a variable using const its value is immutable ie you can't simply reassign the variable with another value neither can you declare const variables as
const variable, another;
because it's pointless afterall

scope of this
let variable decelerations are block scoped therefore if used in an if statement or in a function its value is scoped within that block

Comments

Popular posts from this blog

FlappingBird Postmortem (JS13K)

JavaScript introduction to variables

FlappingBird JS13K Games

How to target all elements of a given class name in JavaScript

Zedplug will be decommissioned on November 30th