'!!' double negates the object thus converting it to a boolean.

-blair

Daemach wrote:
> What does the !! do?
>
>
> Dan G. Switzer, II wrote:
>>> Please add:
>>>
>>>     StructKeyExists: function(s,k){
>>>             for(var n in s){
>>>                     if (n == k) return true;
>>>             }
>>>             return false;
>>>     },
>>>
>>>
>>> Shall we post additions and updates here?
>> This would be much more efficient:
>>
>> StructKeyExists: function(s,k){
>>      return !!s[k];
>> },
>>
>> However, it's also important to remember that a ColdFusion "structure"
>> isn't
>> the exact same thing as a JavaScript Object.
>>
>> -Dan


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to