[Project_owners] Mixing conditional operators and new Boolean

Onno Ekker o.e.ekker at gmail.com
Tue Feb 19 23:01:11 PST 2008


Haven't tested it, but could it not be written as:
var Private = new Boolean(!Clan && !Group && !Admin);

Jesper Staun Hansen wrote:
> Hello.
>
> I was just wondering if this would even work for all:
> var Private = (!Clan && !Group && !Admin)? new Boolean(true) : new 
> Boolean(false);
>
> Would the new Boolean(true) be passed to Private or would I error by 
> design here?
> Does it work for all new something.
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners
>   



More information about the Project_owners mailing list