{"id":4125,"date":"2024-10-08T15:07:46","date_gmt":"2024-10-08T20:07:46","guid":{"rendered":"https:\/\/frontendmasters.com\/blog\/?p=4125"},"modified":"2024-10-08T15:07:47","modified_gmt":"2024-10-08T20:07:47","slug":"a-guide-to-destructuring-in-javascript","status":"publish","type":"post","link":"https:\/\/frontendmasters.com\/blog\/a-guide-to-destructuring-in-javascript\/","title":{"rendered":"A guide to destructuring in JavaScript"},"content":{"rendered":"\n<p>I love those three little dots in JavaScript. <a href=\"https:\/\/piccalil.li\/blog\/a-guide-to-destructuring-in-javascript\/\">Mat Marquis has a nice article covering them<\/a> (&#8220;destructuring&#8221; as it were) nicely. And agreed there are plenty of times they can be confusing. What always gets me is that sometimes it is used to &#8220;<em>pluck off<\/em>&#8221; the remaining the values from an array or object (which is &#8220;rest&#8221;), and sometimes it&#8217;s used to &#8220;<em>splat on<\/em>&#8221; all the values from an array or object (which is &#8220;spread&#8221;). <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I love those three little dots in JavaScript. Mat Marquis has a nice article covering them (&#8220;destructuring&#8221; as it were) nicely. And agreed there are plenty of times they can be confusing. What always gets me is that sometimes it is used to &#8220;pluck off&#8221; the remaining the values from an array or object (which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4126,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[29],"tags":[246,3,245,244],"class_list":["post-4125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-the-beat","tag-destructuring","tag-javascript","tag-rest","tag-spread"],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2024\/10\/spread.jpg?fit=1428%2C866&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/4125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/comments?post=4125"}],"version-history":[{"count":1,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/4125\/revisions"}],"predecessor-version":[{"id":4127,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/4125\/revisions\/4127"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media\/4126"}],"wp:attachment":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media?parent=4125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/categories?post=4125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/tags?post=4125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}