Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
</body>
</html>
 
MyBaseClass = function(a) {
     this.a = a;
};
MyBaseClass.prototype.init = function() {
    console.log('I am initializing the base class');
};
MyChildClass = function(a) {
  this.a = a;
}
MyChildClass.prototype = new MyBaseClass();
MyChildClass.prototype.init = function() {
    MyBaseClass.prototype.init.call(this);
    console.log('I am initializing the child class');
};
var child= new MyChildClass();
child.init();
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
dystroypro
0viewers