Open panzerdp opened 3 years ago
Comment written by Jeff Keihl on 03/05/2018 20:01:42
Thanks for the clear explanation
Comment written by Dmitri Pavlutin on 03/06/2018 06:02:51
You're welcome.
Comment written by Steffen Kowalski on 12/10/2018 07:53:51
I join in @jeffkeihl:disqus . Clear and easy explained.
Comment written by radu belii on 01/12/2019 19:51:21
const users = {
firstName: 'Noidar',
lastName: 'ladorm',
city: 'Chisinau'
}
const { city, ...user} = users;
console.log(user);
One way if you want to extract data that you need from an object, with rest operator.
Comment written by Dmitri Pavlutin on 01/15/2019 12:56:20
Thanks!
Comment written by Dmitri Pavlutin on 01/15/2019 12:56:32
Yep, that would work.
Comment written by Edson Catugy on 01/26/2019 02:13:46
Useful information
Comment written by Dmitri Pavlutin on 07/05/2019 16:57:44
I'm glad you find it useful!
Comment written by saqib on 01/28/2020 04:52:46
awesome
Love it.
Written on 07/30/2017 12:20:25
URL: https://dmitripavlutin.com/object-rest-spread-properties-javascript/