I have two variables. One variable gets set to the other, but I would like to assign the value, not the pointer. According to Microsoft's Javascript Docs, a variable, when assigned, is set to the same pointer of the source variable.
Here is a boiled-down version of my code:
var foo = { "baz": "qux" };
var bar = foo;
foo.baz = "quuz";
console.log(foo); // should equal {"baz": "quuz"}
console.log(bar); // should equal {"baz": "qux"}
Is there an easy, straightforward way to do this? If so, I can't find any documentation of it.