Write a JavaScript deep copy with a twist: every array in the copy gets its original length appended — and changing the copy must never touch the original.
Write a JavaScript deep copy with a twist: every array in the copy gets its original length appended — and changing the copy must never touch the original.
Opens with the full question.