After a brief hiatus, we're back! Today, we'll look at how to perform a 'deep copy' of structures in JavaScript. We'll look at a couple of different out-of-the-box solutions and then roll our own recursive solution. This tutorial will also provide some background on the difference between copying by reference and by value in JS, and the difference between 'deep' and 'shallow' copies.
Recently, I've been working a lot with Vue.js. Not having much of a JavaScript background, I've been bitten by what seem like some pretty basic 'gotchas'. I've also had to look up a couple fairly basic things a number of times, which usually means one thing: it's time for some structured notes!