unction HelloFunc() {
    this.greeting =" hello";
}

HelloFunc.prototype.call = function(func) {
    func ? func(this.greeting) : this.func(this.greeting);
}

var userFunc = function(greeting) {
    console.log(greeting);
}

var objHello = new HelloFunc();
objHello.func = userFunc;
objHello.call();



function saySomething(objmethodNamename) {
    return(function(greeting) {
        return obj[methodName](greetingname);
    });
}

function newObj(objname) {
    obj.func = saySomething(this,"who",name);
    return obj;
}

newObj.prototype.who = function(greetingname) {
    console.log(greeting + "" + (name||"everyone"));
}

var obj1 = new newObj(objHello,"zzoon");
obj1.call();

이걸 입문자가 어케해;