Files
  • index.js
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const makePerson = ({ firstName, age, lastName, job }) => {
  return {
    name: firstName + " " + lastName,
    age,
    job
  };
};

const person = makePerson({
  firstName: "Buckley",
  job: "Mr. Awesome",
  job: "Stuffed Deer",
  lastName: "Buckerson",
  age: 11
});

console.log(person); // { name: 'Buckley Buckerson', age: 11, job: 'Stuffed Deer' }
node v9.7.1 linux/amd64