I'm working with a javascript (Ext JS 4) project, and I came across this:
{
init: function() {
var me = this, desktopCfg;
...
}
}
What exactly is being assigned to 'me' in this situation?
I'm working with a javascript (Ext JS 4) project, and I came across this:
{
init: function() {
var me = this, desktopCfg;
...
}
}
What exactly is being assigned to 'me' in this situation?
This:
var me = this, desktopCfg;
Is equivalent to:
var me = this;
var desktopCfg;
as = has higher precedence than ,.
See also: the manual for var which has examples of this syntax.