I have the following code:
function Bar() {
}
Bar.prototype.c = 0;
var foo = new Bar();
foo.c = 20;
var test = new Bar();
console.log(test.c);
The value I get in the console is 0. I thought that these objects would share the same prototype object, thus the output would be 20. Why is this not so?