Hey guys, in some scripts I see a different way of calling a function. I was wondering what the idea behind this is. Is it a performance thing or something?
The (I guess) simple example:
function Foo() {
alert('hello');
}
Foo();
And this is what I more and more often see in code from others:
function Foo() {
alert('hoi');
}
var foo = new Foo();
foo.load();
I know how to use both, but I was wondering if there are certain cases when one is better to use than the other.
Bookmarks