const arr = ['hello', 1, { a: 'test' }]; const copy = arr.slice();
{"ScriptPreparationCode":"const arr = [\u0027hello\u0027, 1, { a: \u0027test\u0027 }];\r\nconst copy = [...arr];","TestCases":[{"Name":"slice","Code":"const arr = [\u0027hello\u0027, 1, { a: \u0027test\u0027 }];\r\nconst copy = arr.slice();","IsDeferred":false},{"Name":"spread","Code":"const arr = [\u0027hello\u0027, 1, { a: \u0027test\u0027 }];\r\nconst copy = [...arr];","IsDeferred":false}]}