Skip to content

Instantly share code, notes, and snippets.

@rohit012 rohit012/es6-letConst.js
Last active Jan 16, 2017

Embed
What would you like to do?
var value1 = 100;
let value2 = 100;
{
var value1 = 200
let value2 = 200
}
console.log(value1); // 200
console.log(value2); // 100
const val3 = 22;
val3 = 24; // error: val3 is read only
const val3 = 22; // error: duplicate declaration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.