The code is here:
Father.js
(function(){
function father(){
};
father.prototype.init = function(){
console.log('father');
}
})()
Child.js
(function(){
function child(){
}
child.prototype.init = function(){
console.log('child');
}
var father = new father();
})()
I have 2 questions: How can I call father object or child object between script tag or any third javascript files that I create ? Second: how can I call the father object inside child class. I am new to JS and have some problems with OOP in javascript. Thank you very much for your help