Created
March 27, 2019 22:59
es6 - new variable declarations - let and const - 4.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let firstname = 'John'; | |
console.log(firstname); // ouputs: John | |
let firstname = 'Jane'; // Error: Uncaught SyntaxError: Identifier 'firstname' has already been declared | |
firstname = 'Jane'; | |
console.log(firstname); // ouputs: Jane |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment