Not sure about google-datalayer, but primitives in Javascript are passed by value, and objects by reference. So, consider
var price = 3;
var object_with_price = { price: 3 };
var data_with_price = { value: price };
var data_with_object = { value: object_with_price };
If you now change price to 4, data_with_price.price will still be 3 because the value had been passed.
But if you do object_with_price.price = 4, then data_with_object.value.price will also be 4.
If you change object_with_price = { price: 5 }, data_with_object will remain unchanged.