Skip to content

Instantly share code, notes, and snippets.

@iSkore
Created May 12, 2016 22:21
Show Gist options
  • Save iSkore/926596fcfe1249086b86238e18793d33 to your computer and use it in GitHub Desktop.
Save iSkore/926596fcfe1249086b86238e18793d33 to your computer and use it in GitHub Desktop.
/*
* Below is an example of when to use `var` and `let`
*/
'use strict';
let a = 'a';
var b = 'b';
const c = 'c';
{
let d = 'd';
}
{
var e = 'e';
}
console.log( a );
console.log( b );
console.log( c );
//console.log( d ); => throws error
console.log( e );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment