Created
March 27, 2019 22:58
es6 - new variable declarations - let and const - 1.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
// declare variable "firstname" | |
var firstname = 'John'; | |
console.log(firstname) // outputs: "John" | |
// re-declare the same variable "firstname" with different value | |
var firstname = 'Jane'; | |
console.log(firstname) // outputs: "Jane" | |
// re-assign the value of "firstname" | |
firstname = 'Jack'; | |
console.log(firstname) // outputs: "Jack" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment