Skip to content

Instantly share code, notes, and snippets.

@matanlurey
Created April 24, 2017 03:05
Show Gist options
  • Save matanlurey/d7882cb76b065ea4c6de7e12f532cf47 to your computer and use it in GitHub Desktop.
Save matanlurey/d7882cb76b065ea4c6de7e12f532cf47 to your computer and use it in GitHub Desktop.
An example of using "const" in ES6
// 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