Created
December 4, 2015 09:22
-
-
Save rtivital/5a84de74efa8a94be00a 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
| // Самый быстрый способ клонировать объект - пропустить его через | |
| // функции JSON.parse() и JSON.stringify() - таким образом будут | |
| // клонированы все свойства объекта на любой глубине вложенности | |
| var clonedObject = (JSON.parse(JSON.stringify(originalObject))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment