Top "Logical-operators" questions

Logical operators are symbols that aid in evaluating boolean expressions.

How does javascript logical assignment work?

In javascript, if we have some code such as var a = "one"; var b = q || a; alert (b); The logical …

javascript variable-assignment logical-operators
MongoDB in Go (golang) with mgo: how to use logical operators to query?

I would like to run the following query in golang using mgo in a pipeline. {"key1" : 1, "$or" : [{"key2" : 2}, {"key3" : 2}]} I …

mongodb go match logical-operators mgo
Why does C not have a logical assignment operator?

I had the need to code a statement of the form a = a || expr; where expr should be evaluated and …

c logical-operators
Is there actually a reason why overloaded && and || don't short circuit?

The short circuiting behaviour of the operators && and || is an amazing tool for programmers. But why do they …

c++ c++11 operator-overloading logical-operators short-circuiting
!! c operator, is a two NOT?

I reading this code, and have this line switch (!!up + !!left) { what is !! operator ? two logical NOT ?

c operators logical-operators
Reason for the existence of non-short-circuit logical operators

When used with boolean operands, & and | become logical operators per Section 15.22.2 of the JLS. Unlike && and ||, however, …

java logical-operators
Pandas Equivalent of R's which()

Variations of this question have been asked before, I'm still having trouble understanding how to actually slice a python series/…

python pandas logical-operators which
The written versions of the logical operators

This is the only place I've ever seen and, or and not listed as actual operators in C++. When I …

c++ language-features logical-operators
Difference between & and && in Scala?

I am trying to figure out the difference between & and && in Scala. I got this after searching &…

scala syntax bitwise-operators logical-operators operands
How to create a method to return 1 or 0 without using conditions?

I was asked a question in an interview to return 1 if provided 0 and return 0 if provided 1 without using conditions i.…

java c# logic logical-operators