IT SOLUTIONS
Your full service technology partner! 
+Expand
   ► KBTo/From GuidesJavaScript  Print This     

Logical Operators (JavaScript and Delphi Prism Cross Reference Guide)

By Mike Prestwood

JavaScript versus Delphi Prism: A side by side comparison between JavaScript and Delphi Prism.

 
Operators
 

A language symbol used for assignment, comparison, computational, or as a logical.

Logical Operators

[Other Languages] 

Languages Focus

Logical operators perform conditional and, or, and not operations. Some languages support both binary logical operators that link two and unary logical operators negate (make opposite) the truth value of its argument. Finally, some languages short circuit logic. For example, with this or that, if this is an expression returning true, then that is never executed.

JavaScript: 

JavaScript logical operators:

&& and, as in this and that
|| or, as in this or that
! Not, as in Not This

JavaScript always short circuits. Given the expression this || that, if this evaluates to true, then that is never executed.

Syntax Example:
//Given expressions a, b, c, and d:
if !((a && b) && (c || d)) {
  //Do something.
}
Delphi Prism: 

Prism logical operators:

and and, as in this and that
or or, as in this or that
not Not, as in Not This
xor either or, as in this or that but not both

Syntax Example:  
//Given expressions a, b, c, and d:
if Not (a and b) and (c or d) then
  //Do something.












Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]