SHARE
TWEET

Untitled

a guest Aug 24th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var userInfo = {
  2.   name: "Mayank",
  3.   age: 31,
  4.   designation: "Developer",
  5.   getData: function() {
  6.     console.log(this.name);
  7.   }
  8. }
  9.  
  10. var stringifiedObject = JSON.stringify(userInfo);
  11.  
  12. var newDeepCopy = JSON.parse(stringifiedObject);
  13.  
  14. console.dir(newDeepCopy)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top