In a reassignment operation involving primitive data types such as strings, numbers and booleans, the original variable is copied by JavaScript. With non-primitive data types like arrays and objects, only a reference to the values is passed. This is also known as shallow copying. If we instead want to copy an object so that we
3 Comments
Sort: