私にはこの少し奇妙な状況があります。私が持っているブール式のステートメントは、alert
andif
演算子で2つの異なる評価を与えています。
var test = new Boolean(homePageNonActive && ((firstTime && homePageHash) || (!firstTime && !homePageHash)));
alert(homePageNonActive && ((firstTime && homePageHash) || (!firstTime && !homePageHash))); // GIVES ME FALSE
alert(test); // GIVES ME TRUE ??? WHY?
if(test){
alert(homePageNonActive); // GIVES ME TRUE
alert(firstTime); // GIVES ME TRUE
alert(homePageHash); // GIVES ME FALSE
}