Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SuperClass(info) {
- this.info = info;
- }
- SuperClass.prototype.GetInfo = function() {
- console.log(this.info);
- };
- function SubClass(info) {
- SuperClass.call(this, info);
- }
- SubClass.prototype = Object.create(SuperClass.prototype);
- SubClass.prototype.constructor = SubClass;
- var sc = new SubClass("TEST");
- sc.GetInfo();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement