waynedunkley
5/3/2016 - 1:26 AM

Object Destructuring Code Ex. 1

Object Destructuring Code Ex. 1

const user = { name: 'dave', gender: 'male', age: '24' };

const name   = user.name;
const gender = user.gender;
const age    = user.age;

console.log(name) //dave