and operator in javascript

JavaScript
//&& returns true if both values are true
//or returns the second argument if the first is true
var a = true
var b = ""
var c = 1

true && "" //""
"" && 1 //""
false && 5 //false//& (bitwise AND) operator
console.log(5 & 13); //outout: 5
/*
5  = 0101 (base 2)
13 = 1101 (base 2)
//AND every bit together from both numbers
+----+
|0101|
|1101|
+----+
|0101|
+----+
0101 = 5 (base 10)
*/

Source

Also in JavaScript: