KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
It's about best practices when you need to copy object in javascript.. For example: I have an object { name: 'Dodo', method: function () { console.log(this.name) }} ; I need to create a copy of it: var obj = { name: 'Dodo', method: function () { console.log(this.name) } }; // what is better? var copyUnderscore = _(obj).clone(); var copySimple = obj; What is the better way? Thanks!
Tags (comma-separated)
Save Edits
Cancel