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

How to make a html5 breakout game in JavaScript

How to set content disposition headers for express nodejs apps

Ways of iterating Object properties in JavaScript

How to evaluate a string on a regular expression rule in JavaScript

JavaScript math constants