Here's some question about oop in js (questions in the code below).
<html>
<script>
function A(){
a = 'a - private FROM A()';
this.a = 'a - public FROM A()';
this.get_a = function(){
return a;
}
}
function B(){
this.b = 'b - private FROM B()';
this.a = 'a - public FROM B() ';
}
C.prototype = new A();
C.prototype = new B();
C.prototype.constructor = C;
function C() {
A.call(this);
B.call(this);
}
var c = new C();
//I've read paper about oop in Javacscript but they never talk
//(the ones have read of course) about multiple inheritance, any
//links to such a paper?
alert(c.a);
alert(c.b);
alert(c.get_a());
//but
//Why the hell is variable a from A() now in the Global object?
//Look like C.prototype = new A(); is causing it.
alert(a);
</script>
</html>