JScript ユーザーズ ガイド、ブール型

var x;

WScript.Echo(true);  // -1
WScript.Echo(false); //  0

if (0)    { WScript.Echo("0 then"); }         else { WScript.Echo("0 else"); }
if (null) { WScript.Echo("null then"); }      else { WScript.Echo("null else"); }
if (x)    { WScript.Echo("undefined then"); } else { WScript.Echo("undefined else"); }
if ("")   { WScript.Echo("空文字 then"); }    else { WScript.Echo("空文字 else"); }

if (1)     { WScript.Echo("1 then"); }        else { WScript.Echo("1 else"); }
if (-1)    { WScript.Echo("-1 then"); }       else { WScript.Echo("-1 else"); }
if ("a")   { WScript.Echo("a then"); }        else { WScript.Echo("a else"); }