how to create a deep copy of an variable in js code example Example: how to make a deep copy in javascript JSON.parse(JSON.stringify(o))