Last active
February 22, 2022 00:12
-
-
Save blarfoon/7d0969dc11eb0a4e9ef08251da80bea2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 myObject = { | |
hi: "mom", | |
changeHi() { | |
this.hi = "medium"; | |
}, | |
something: undefined, | |
}; | |
console.log(myObject); // > {hi: "mom", something: undefined, changeHi: ƒ} | |
const myNewObject = JSON.parse(JSON.stringify(myObject)); | |
console.log(myNewObject); // > {hi: "mom"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment