QP School

Full Version: Clone an array in JavaScript
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
let x = [1, 2, 3, 4];
let y = Array.from(x);
document.write(y);