Skip to content

Instantly share code, notes, and snippets.

@shelomentsevd
Last active June 3, 2016 16:50
Show Gist options
  • Save shelomentsevd/b599c6ea85367d457fbddf6bd50889a4 to your computer and use it in GitHub Desktop.
Save shelomentsevd/b599c6ea85367d457fbddf6bd50889a4 to your computer and use it in GitHub Desktop.
I love ES6
var arr = [
{
'name': 'Paul',
'salary': '5 000$'
},
{
'name': 'Jessica',
'salary': '6 000$'
},
{
'name': 'Mike',
'salary': '12 000$'
},
{
'name': 'Richard',
'salary': '1 000$'
}
];
arr.forEach(
({name, salary} = it) => {
console.log([name, salary].join(':'));
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment