I am looking to achieve the following:
var my_data = {
x : 'orange',
y : 2
}
function object(data){
this.x = 'banana';
this.y = 3;
this.z = 'default value';
}
once I have executed:
var new_instance = object(my_data)
I expect to receive:
new_instance.x == 'orange'