What is the difference between this:
var doSomething=function()
{
//do blah blah blah...
}
And this:
function doSomething()
{
//do blah blah blah...
}
Another question: In PHP, we create a function by doing this:
function doSomething(a,b)
{
//do something to variable a and b...
}
In JavaScript, we may have an object before the function:
object.doSomething(a);
My second question is, how would you create a function which requires an object in JavaScript?