and operator in javascript
//AND Operator expressed as &&
const x = 7;
const y = 4;
(x == 7 && y == 5); // false
(x == 3 && y == 4); // false
(x == 7 && y == 4); // true
if (condition == value && condition == otherValue) {
return something;
}//&& 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)
*/
Also in JavaScript:
- discord.js role permissions
- webpack react proxy not working
- jquery change selected option to first
- Javascript format to currency
- jquery delete buton
- tranary operator in js
- javascript storage get set item
- how to loop over dom objects javascript
- javascript validate date
- react and bootstrap
- jquery alert
- react environment variables
- filter items javascript
- simple return data jquery
- javascript array vs object
- Disable Multiple Form Submits with Vanilla JavaScript
- docker react
- google maps js remove google maps logo
- how to read if a person has send a message on discord.js
- tays javascript answer test
- express get query params from url
- javascript moeda reais
- jquery data attribute
- get number of nodes networkx