function hello(thing) {
    console.log(this + " says hello " + thing);
}

hello.call("Yehuda", "world") //=> Yehuda says hello world
function hello(thing) {
    console.log("Hello " + thing);
}

// this:
hello("world")

// desugars to:
hello.call(window, "world");


Member Functions
The next very common way to invoke a method is as a member of an object (person.hello()). In this case, the invocation desugars:

var person = {
    name: "Brendan Eich",
    hello: function(thing) {
        console.log(this + " says hello " + thing);
    }
}

// this:
person.hello("world")

// desugars to this:
person.hello.call(person, "world");


Note that it doesn't matter how the hello method becomes attached to the object in this form. Remember that we previously defined hello as a standalone function. Let's see what happens if we attach is to the object dynamically:


function hello(thing) {
    console.log(this + " says hello " + thing);
}

person = { name: "Brendan Eich" }
person.hello = hello;

person.hello("world") // still desugars to person.hello.call(person, "world")

hello("world") // "[object DOMWindow]world"

Notice that the function doesn't have a persistent notion of its 'this'. It is always set at call time based upon the way it was invoked by its caller.