Skip to content

Instantly share code, notes, and snippets.

@BrunoGiubilei
Created February 17, 2020 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrunoGiubilei/15419f01332e18ac28faef4cba992e43 to your computer and use it in GitHub Desktop.
Save BrunoGiubilei/15419f01332e18ac28faef4cba992e43 to your computer and use it in GitHub Desktop.
copy prototype for array of object
Array.prototype.copy = function() {
return this.map(function(e){return {...e}});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment