本文档基于 CC协议(Creative Commons Share-Alike License)发布,是developer.mozilla.com, www.mozref.comwww.aptana.com共同劳动的成果。

&&

Returns true if both the first and second expression evaluate to true.

Syntax

expressionA && expressionB

Example

var myCat = "Jasmine";
var myDog = "Jordo";
if ((myCat == "Jasmine") && (myDog=="Jordo"))
    return true; //Returns true because both conditions are true.

Remarks

Returns false if either expression is false.