JSFiddle - React, Tailwind, and code Playground
by HYEONGJINKIM
JavaScript
var nhn = nhn ||{};
nhn.util = nhn.util || {};
nhn.util.hello = function(options){
$.extend(this, options || {});
this.init();
};
nhn.util.hello2 = function(options, parent){
$.extend(this, options || {});
this.init();
};
nhn.util.hello.prototype = {
init : function(){
console.log("hello init");
},
hello : function(){
console.log("hello hello");
},
print : function(){
console.log("Print");
}
};
nhn.util.hello2.prototype = $.extend(true,nhn.util.hello.prototype,{
init : function(){
console.log("hello2 init");
this.hello();
this.hi();
},
/*hello : function(){
console.log("hello2 hello");
},*/
hi : function(){
console.log("hello2 hi");
}
});
//nhn.util.hello2.prototype = $.extend(true, {}, nhn.util.hello2.prototype, nhn.util.hello);
//console.log(nhn.util.hello2.prototype);
console.log(new nhn.util.hello2());