Hello, I have been playing with Object.create, as opposed to the prototype and new methods.
Bellow is some code which deploys a particular method in dealing with this - and I do not understand how to make the ‘call’ to change the rating or get the **value **of my new object instance.
Mainly because of trying to access the get/set functions inside the object operation.
var Obj = Object.create(Object, {
rating: {
value: 0
},
operation: {
set: function(value) {
this.rating = value;
},
get: function() {
return this.rating;
}
}
});
var instance = Object.create(Obj);
Some forums have said that i need to include writable, configurable, enumerable as properties into every function declaration - but come on - that sucks - and im not writing an OS … I am trying to learn here, and make code accessible - and yes standards are good - but whoa ‘every’ function declaration - what a load of superfluous code - ive never seen that anywhere.
OK - please help me out here!!! :block: