Last active
April 4, 2021 03:47
-
-
Save njbmartin/2cd62fa43b4df3a2a83b1c7b66bf617b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const person = { | |
firstName: "Jane", | |
lastName: "Bloggs", | |
email: "jane@example.com", | |
phone: "0123456789" | |
}; | |
const { | |
email, | |
...personWithoutEmail | |
} = person | |
console.log(personWithoutEmail.email); | |
// expected output: undefined | |
console.log(person.email); | |
// expected output: "jane@example.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment