javascript - Copy array by value - Stack Overflow
Tue Jan 31 2023 18:33:58 GMT+0000 (UTC)
Saved by
@abd
#javascript
// Literal values (type1)
const booleanLiteral = true;
const numberLiteral = 1;
const stringLiteral = 'true';
// Literal structures (type2)
const arrayLiteral = [];
const objectLiteral = {};
// Prototypes (type3)
const booleanPrototype = new Bool(true);
const numberPrototype = new Number(1);
const stringPrototype = new String('true');
const arrayPrototype = new Array();
const objectPrototype = new Object(); // or `new function () {}
content_copyCOPY
https://stackoverflow.com/questions/7486085/copy-array-by-value
Comments