Skip to content
Latest: Publish JavaScript Packages to NPM Like a Pro!

Edit It: Extract the profile object's value into the surname variable

Home>Object Destructuring in JavaScript>Edit It: Extract the profile object's value into the surname variable

Edit It: Extract the profile object's value into the surname variable

This code shows how to destructure an object when the property's name differs from the variable's.

See it on StackBlitz