Skip to content

Instantly share code, notes, and snippets.

@bobdobbalina
Last active June 3, 2020 14:33
Show Gist options
  • Select an option

  • Save bobdobbalina/142f0cd2fe36e322619a441b7dd77f50 to your computer and use it in GitHub Desktop.

Select an option

Save bobdobbalina/142f0cd2fe36e322619a441b7dd77f50 to your computer and use it in GitHub Desktop.
Javascript: Merge several objects together
const user = {
name: 'John Ludwig',
gender: 'Male'
};
const college = {
primary: 'Mani Primary School',
secondary: 'Lass Secondary School'
};
const skills = {
programming: 'Extreme',
swimming: 'Average',
sleeping: 'Pro'
};
const summary = { ...user, ...college, ...skills };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment