Skip to content

Instantly share code, notes, and snippets.

@rohit012
Last active January 16, 2017 09:46
Show Gist options
  • Save rohit012/3175d9181b9c2cd6bd8f51079953935b to your computer and use it in GitHub Desktop.
Save rohit012/3175d9181b9c2cd6bd8f51079953935b to your computer and use it in GitHub Desktop.
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