I was wondering if there is a “&” logical operator in Javascript. I tried running 1 & 0 and 1 && 0 in Firebug(Firefox) and it returned a 0 for both.
Someone told me that C# accepts both & and double &&, double being more efficient as it will exit the comparison loop as soon as a false is encountered, but I was not able to find any info for Javascript on that.
Any ideas?
No.
&is a bitwise AND operator.&&is the only logical AND operator in Javascript.