-
Operators are used to manipulate values.They can be unary, binary and ternary. They are used for string concatenation, math, logic and comparison of expressions.
-
+, -, <,>, <=,>=, % !=, , etc
3.&&, !,!! and , not, or
Operators are used to manipulate values.They can be unary, binary and ternary. They are used for string concatenation, math, logic and comparison of expressions.
+, -, <,>, <=,>=, % !=, , etc
3.&&, !,!! and , not, or
1: operators are able to manipulate a value. There are many types of operators.
2: +,-,*,/,% as well as ==,===,<=,>=,!=,!==
3: &&, ||
Binary operators are operators that result only one answer out of two answers possible. Like ‘true’ or ‘false’.
Logical operators are operators that perform a logical function or compare values and types which return binary results (true,false).
What are operators?
They are arithmetical actions applied to values.
What binary operators do you know?
They are operators that work with two operands.
What logical operators do you know?
AND ( && ) OR ( || ) !(not)
Operators in javascript are like instructions that tell you how to manipulate data. Placed between two values an operator specifies which mathematical operation to use on the values.
Binary operators are comparison operators that evaluate to either true or false. Binary operators include: greater than >, less than <, greater than or equal to <=, less than or equal to <=, equal to ==, not equal to !=.
Logical operators are used to reason about values, returning a Boolean value of either true or false. Logical operators include: AND &&, OR ||, NOT !.
The ternary operator was always confusing so I appreciated how the “conditional operator” was described. It isn’t so confusing when you think of the value on the left of ? as “picking” one of the values on the right of the ? based on if it’s true or false. Value left of colon is true and right value is false: (true ? 1 : 2 ) ==> 1.
Operators are usually symbols (they can be words) placed between values to create a new output. In the expression 2 + 2 = 4 “+” is the operator and 4 is the new output it generates.
+, - , *, /, > (greater), > (less), == (equal to), != (not equal to)
&& for ‘and’
II for ‘or’
? (a) : (b) - the conditional (ternary) operator, where value a or b is picked based on a true/false premise
Hi @Fati,
Nice answers
By the way…
…I assume the *
was a formatting error… the asterisk is the arithmetic multiplication operator, and not a logical operator.
oh crap thanks Jon, I really have to be careful with the little details!
1. What are operators?
• An operator is a symbol that tells the compiler to perform a specific mathematical, logical or relational operation and produces a result.
2. What binary operators do you know?
• Binary operators are:
(+ - * /) plus, minus, multiply, divide
= (greater than or equal to)
<= (less than or equal to)
== (equal to)
!= (not equal to)
3. What logical operators do you know?
• and (&&), or (||) and not (!)
1. An Operator is a symbol used to operate on a value
2. Examples of Binary (Yes or No / True or False) Operators include:
+ Add
- Subtract
* multiply
/ divide
< less than
> greater than
<= less than or equal to
>= greater than or equal to
3. Logical Operators include:
&& and
|| or
! not
What are operators?
Operators perform actions to values.
What binary operators do you know?
Binary operators perform an action to 2 values (eg x+y or a*b)
What logical operators do you know?
and operator - &&
or operator - ||
ternary or conditional operator - ? : (this uses 1 value to pick 1 out of 2 other values)
What are operators?
Operators allow a program to perform an arithmetic or logical operation.
What binary operators do you know?
+, -, *, **, /, %
What logical operators do you know?
<, >, =<, =>, ==, ===
Haha just joking…
logical operators
&& and
|| or
logical operators are &&, || ,!
The third answer you listed are call assignment operators
Hi @DeezSats,
That’s true… but they also perform other different actions (operations) on values, besides arithmetic and logical ones:
e.g. assignment operators, comparison operators, typeof
(returns the value type of the following value) etc.