Created
April 24, 2017 03:05
-
-
Save matanlurey/d7882cb76b065ea4c6de7e12f532cf47 to your computer and use it in GitHub Desktop.
An example of using "const" in ES6
This file contains hidden or 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
// Define USER as a constant and give it an initial value. | |
const USER = { name: 'Joe'; } | |
// This will throw an error. | |
USER = {}; | |
// But this will not. | |
USER.name = 'Jill'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment