Hi @Mining365,
Just be careful with the difference between !=
and !
-
!=
is a binary, comparison operator, and means "is not equal to in value" -
!
is the unary, logical NOT operator
Hi @Mining365,
Just be careful with the difference between !=
and !
!=
is a binary, comparison operator, and means "is not equal to in value"
!
is the unary, logical NOT operator
Hi @Mrbryce,
Yes… and more specifically, operators perform actions (operations, as you say) on values.
But, you seem to be confused about what exactly binary and logical operators are…
No…what you have described is a Boolean expression. A binary operator is an operator that performs an action on two values. There are also unary operators, which perform actions on just one value, and a ternary operator which performs actions on three values.
Have a look at this post for some examples.
No… logical operators are used in Boolean expressions which evaluate to either true
or false
. Examples of logical operators are:
&&
AND||
OR!
NOTWhat are operators?
Assign values to variables
What binary operators do you know?
& = And
| = Or
~ = Not
What logical operators do you know?
&& = Logical and
|| = Logical or
! = Logical not
Ok thanks for putting me straight on this.
What are operators?
operator inlude two types:
math operator:±* /
logical operator >=;<=;==;!=
What binary operators do you know?
and; or
What logical operators do you know?
logical operator : and; or; not
What are operators?
Operators are constructs which behave like functions but which differ syntactically or semantically from usual functions. Operators in programming languages are being used for arithmetic, comperative and logical results. Languages usually have built-in operators. *
What binary operators do you know?
Operators that use two values are called binary operators
x + y, x - y, x * y, x / y, x % y
What logical operators do you know?
if x == y && y != z (if x equals y **and** y does **not** equal z)
if z == x || z != y (if z equals x **or** z does **not** equals y)
Excellent answers sir, well documented! Please keep them like that
Carlos Z.
Excellent answers sir, well documented! Please keep them like that
Carlos Z.
JavaScript operators are used to assign values, compare values, perform arithmetic operations, and more. (+, -) are examples of operators.
Binary Operators: Below are examples
+, -, *, /, <, >, %
Logical Operators: and, or, and not
Likewise mr. thecil. Please never hesitate to correct and guide me.
Operators are used to manipulate values. Putting an operator between two values will apply it
to those values and produce a new value.
The / represents division.
The + represents addition.
The - represents subtract.
The * represents multiply.
The % represents the remainder, for example X%Y is the remainder of dividing X by Y.
There are three logical operators : and,or and not.
The && operator represents logical and.
The || operator represents logical or.
The ! operator represents logical not.
What are operators?
Operators are constructs which behave like functions but which differ syntactically or semantically from usual functions. Operators in programming languages are being used for arithmetic, comperative and logical results. Languages usually have built-in operators.
What binary operators do you know?
binary operators for arithmetic (+, -, *, /, and %),
for comparison (==, !=, ===, !==, <, >, <=, >=)
What logical operators do you know?
Logical Operators: and, or, and not (&&, ||, !)
What are operators?
An operator in a programming language is a symbol that tells the compiler or interpreter to perform specific mathematical, relational or logical operation and produce final result.
What binary operators do you know?
Operators that perform action on two values such as arithmetic operators (multiplication, division, addition, subtraction), modulus.
What logical operators do you know?
Boolean logic on two expressions, AND, OR, NOT
I had some truble understanding this area but your answer made it very easy to make sense of it all. Thank you!
- What are operators?
In programming operator is a character that represent action.
- What binary operators do you know?
multiplication (*), remainder (%), and division (/)
addition (+) and subtraction (-)
less than (<), less than or equal to (<=), greater than (>), and greater than or equal to (>=)
equality (==) and inequality (!=)
- What logical operators do you know?
AND (&&)
, OR (||)
and NOT (!)