Javascript Questions

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
mudvein
Forum Commoner
Posts: 45
Joined: Wed Mar 16, 2005 4:39 pm

Javascript Questions

Post by mudvein »

I'm working with Javascript and have a small question about what I'm looking at.

In many examples I am seeing code that looks like this :

Code: Select all

var.SomeNameHere = function(param1, param2, param3) {
 //some stuff done here
}
What is the point of doing this?


Also, I see a variable being defined like this :

Code: Select all

var.SomeNameHere.extension = {
  loadData: function {
    //if statements and other stuff done
  }
}
And what is the piotn of doing this as well?


If anyone can post me a few links that would explain this I would be very grateful. I have searched google for "Create function" but none of the tutorials show this. Only example code seems to have this in it. Thanks
mudvein
Forum Commoner
Posts: 45
Joined: Wed Mar 16, 2005 4:39 pm

Post by mudvein »

Post Reply