I found this snippet and it deep copies javascript array.
const makeCopy = (items) = items.map(item => Array.isArray(item) ? clone(item) : item);