Top "Logical-operators" questions

Logical operators are symbols that aid in evaluating boolean expressions.

and / or operators return value

I was watching a 2007 video on Advanced Python or Understanding Python, and at 18'27" the speaker claims "As some may …

python operators logical-operators
Why don't logical operators (&& and ||) always return a boolean result?

Why do these logical operators return an object and not a boolean? var _ = (obj.fn && obj.fn() ) || obj._ || ( …

javascript logical-operators
R gotcha: logical-and operator for combining conditions is & not &&

Why doesn't subset() work with a logical and && operator combining two conditions? > subset(tt, (customer_id==177 &&…

r subset logical-operators
Using logical operator in knockout conditional if binding

<!-- ko if:name == 'Setup' || name == 'Appeals' --> <button class="btn dropdown-toggle" data-toggle="dropdown"><span …

knockout.js conditional-statements logical-operators
Are || and ! operators sufficient to make every possible logical expression?

The logical expression ( a && b ) (both a and b have boolean values) can be written like !(!a || !b), …

logic logical-operators
C Preprocessor testing definedness of multiple macros

I searched the site but did not find the answer I was looking for so here is a really quick …

c c-preprocessor logical-operators preprocessor-directive
Applying logical and to list of boolean values

Consider the following list of Boolean values in Scala List(true, false, false, true) How would you using either foldRight …

scala boolean logical-operators fold
Javascript AND operator within assignment

I know that in JavaScript you can do: var oneOrTheOther = someOtherVar || "these are not the droids you are looking for..."; …

javascript variable-assignment logical-operators and-operator
Is relying on && short-circuiting safe in .NET?

Assume myObj is null. Is it safe to write this? if(myObj != null && myObj.SomeString != null) I know …

c# .net operators logical-operators short-circuiting
How to solve && operands to logical scalar

After I run the code in matlab, I encounter this error and unsure how to solve it. How can I …

matlab if-statement logic logical-operators operands