Possible Duplicate:
What is the !! operator in JavaScript?
What is a not not in javascript I have seen this a few times :)
function foo(){
return !!(window.history);
}
i believe it is used for enforcing boolean types...
for example
if("true" == true){
alert("1");
}else{
if(!!"true" == true){
alert("2");
}
}
alerts 2 not 1