Javascript Questions
Posted: Sun Jan 22, 2006 7:52 pm
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 :
What is the point of doing this?
Also, I see a variable being defined like this :
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
In many examples I am seeing code that looks like this :
Code: Select all
var.SomeNameHere = function(param1, param2, param3) {
//some stuff done here
}Also, I see a variable being defined like this :
Code: Select all
var.SomeNameHere.extension = {
loadData: function {
//if statements and other stuff done
}
}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