Skip to content

Instantly share code, notes, and snippets.

@HarplingeTom
Created December 15, 2018 03:58
Show Gist options
  • Save HarplingeTom/8f0759ffc5ba8e60ca979abc14607ea4 to your computer and use it in GitHub Desktop.
Save HarplingeTom/8f0759ffc5ba8e60ca979abc14607ea4 to your computer and use it in GitHub Desktop.
const and reference values
const state = { test: 'apples'};
const defaultState = {test: 'oranges'};
state = defaultState;
console.log(state);
state = {test:'kumquats', anotherKey: 'cherries'};
console.log(state);
console.log(defaultState);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment