Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

5.3.1.1. Logical AND¶

/*The operator takes two operands, and the resulting expression is 
true if both operands are true individually. If either operand is 
false, the overall expression is false.*/

console.log(7 > 5 && 5 > 3);
console.log(7 > 5 && 2 > 3);
console.log(2 > 3 && 'dog' === 'cat');

//true
//false
//false
Comment

5.3.1.2. Logical OR¶

/*JavaScript's logical OR operator, ||, also creates compound boolean
expressions. This operator takes two operands, and the resulting 
expression is true if either of the operands are true individually. 
If both operands are false, the overall expression is false.*/

console.log(7 > 5 || 5 > 3);
console.log(7 > 5 || 2 > 3);
console.log(2 > 3 || 'dog' === 'cat');

//true
//true
//false
Comment

PREVIOUS NEXT
Code Example
Javascript :: alpinejs mail input 
Javascript :: html click to copy to clipboard 
Javascript :: jquerry shorthand for fetch 
Javascript :: bjsmasth update 
Javascript :: handlebars.registerHelper is not a function 
Javascript :: replicate component did update hooks 
Javascript :: check if array in conditional chaining javascript 
Javascript :: key being passed as prop react 
Javascript :: datatables width issue for less number of columns 
Javascript :: google auto complete not show on modal 
Javascript :: How to unmount inactive screens in bottom tab react native 
Javascript :: midpointrounding.awayfromzero javascript 
Javascript :: 10.4.2. Functions // Default Value 
Javascript :: deneme 
Javascript :: OAuth with axios react native 
Javascript :: get keyword in javascript 
Javascript :: interact with flutter and javascript 
Javascript :: what to say to your ex 
Javascript :: best way to store db config in node js 
Javascript :: Generar números aleatorios en Javascript entre un mínimo y un máximo 
Javascript :: Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout. 
Javascript :: npm generate package-lock.json 
Javascript :: parsing data to node application 
Javascript :: close all function of react in vscode mac 
Javascript :: how to make a box in p5js 
Javascript :: createPortal usage 
Javascript :: how is coa useful npm 
Javascript :: how to accept only. proper email from an input field react with functional component 
Javascript :: adding object into object 
Javascript :: jest check the link of a button 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =