Re: "error on page"
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: "error on page"

From: RobG <rgqld@iinet.net.auau>
Date: Fri Jul 22 2005 - 02:08:35 CEST

Lee David wrote:
[...]
>
> Nor did the more compact:
> ns4test = document.layers?true:false;
>

For the sake of the exercise:

    var supportForLayers = !!document.layers;

The use of !! forces the result to be explicitly true or false and have
the right sense.

[...]

-- 
Rob
Received on Tue Oct 18 02:59:36 2005