I'm trying to do call the [[Prototype]] method of an object, by using this tutorial, from Mozilla (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain), but it does not seem to work.
Does anyone knows why?
Thanks,
Some code:
function Graph() {
this.vertices = [];
this.edges = [];
}
Graph.prototype = {
addVertex: function(v) {
this.vertices.push(v);
}
};
var g = new Graph();
g.[[Prototype]];