as follow codes:
var a = {};
if(!!!a[tabType]){
a[tabType] = [];
a[tabType].push([self,boxObj]);
}else{
a[tabType].push([self,boxObj]);
}
i think !!!a[tabType] equals !a[tabType] why use the "!!!" not "!" ?
thank you!
as follow codes:
var a = {};
if(!!!a[tabType]){
a[tabType] = [];
a[tabType].push([self,boxObj]);
}else{
a[tabType].push([self,boxObj]);
}
i think !!!a[tabType] equals !a[tabType] why use the "!!!" not "!" ?
thank you!
The !!
construct forces conversion to a boolean. I don't see the point of it here.
It makes it more obvious to the reader. I would just put spaces around it like this:
if( ! a[tabType]){
But it looks like this programmer is pretty much opposed to spaces.