Skip to content

Instantly share code, notes, and snippets.

@rohit012
Created January 16, 2017 07:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rohit012/9beb54607708958a33509e6f4d8e6ff0 to your computer and use it in GitHub Desktop.
var state1 = {
val1 : 'abc',
val2: 'xyz'
};
var state2 = {
val2 : 'mno',
val3: 'xyz'
};
var state3 = { ...state1, ...state2}; //{val1: 'abc', val2: 'mno', val3: 'xyz'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment