Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Js fundamentals reference vs copy

The most common pitfall in js is probably due to not understanding the difference between primitive types and objects.

TL:DR; arrays and objects are referenced, to make copies use either of the methods slice,concat,[...],Assign,{...}