ES6 - Let

Variable scoping with let.

by Rodwyn Moreno

Babel + JSX

let a = 'hello';

console.log(a);

{
	let a = 'goodbye';
  console.log('a inside scope', a);
  
  let salary = 909090;
}

console.log('This line will show a error cause variable is been called out of the scope.');
console.log(salary);