-
What are operators?
Operators are action-oriented / transformative characters that do something with values. -
What binary operators do you know?
|+|Addition|
|—|---|
|-|Subtraction|
|*|Multiplication|
|**|Exponentiation|
|/|Division|
|%|Modulus (Division Remainder)|
|++|Increment|
|–|Decrement|
|==|Equal to|
|!=|Not Equal to|
|>|Greater than|
|<|Less than|
|>=|Greater or equal than|
|<=|Less or equal than| -
What logical operators do you know?
&& (and), || (or), ! (not)
Logical operators compare values and evaluate to true or false. For instance if x = 4 and y = 6 then: (x < 10 && y > 1) is true. (x == 5 || y == 5) is false. !(x == y) is true.
- What are operators?
Operators do an “operation” to two or more values. For example they can do maths operations between to or more values: 5 + 9; 7 - 2 etc… In this case the “+” and “-” sign are the operators, operating between two values (5 and 9, and 7 and 2) They can also be comparative operators that compare two values to another: 4 < 7; or 13 = 4 + 9. Here the “<” and “=” signs are the operators (note that in the 13 = 4 + 9 equation there is another operator - “+”).
- What binary operators do you know?
- , - , * , / , < , > , <= , >= , = , != , %
- What logical operators do you know?
a. && (and)
b. II (or)
c. ! (not)
d. ? : (conditional/ternary)
-
Operators are symbols to evaluate an expression within the program.
-
+,-,*,/,%,<,>,<=,>=,==,===,!=,!==
-
&&,||,!
- JavaScript operators are symbols that operate on values that are associated.
- +, -, * , /, %, <, >, =, &&, ||, !
- &&, ||, !
Hi @Travis!
Nice answers
You’re right, but just to add… operators can also perform an action on just one value. These are the unary operators, for example the NOT operator !
is also a unary operator as well as a logical operator — you’ll learn about some more of them later in the course (e.g. ++
and --
).
Hi @Bifin!
Questions 1 and 3
Just to check that you understand what the binary operators are:
true
and false
are not operators, they are Boolean values (a type of value); but
OR ||
is a logical operator and a binary operator because it performs an action on two values (true
and false
in your example).
Other examples of binary operators are:
(i) Arithmetic operators
*
multiplied by
/
divided by
%
remainder
+
add
-
subtract
(ii) Comparison operators
>
greater than
<
less than
>=
greater than or equal to
<=
less than or equal to
==
equal to (in value)
!=
not equal to (in value)
Hi @Kingsman! Great answers
I’m sure this was just a copy/paste error, but just to confirm that the decrement operator is 2 minus signs --
and not a single dash –
- Operators are symbols that combine values to interact with one another, creating an expression that outputs an absolute value.
2 Binary operators are operators that combine or compare two or more values. A few examples are add (+), subtract (-), multiply (*) and divide (/). - Logical operators are operators that can be applied to Boolean values such as and (&&), or (||), not (!).
Hi @Emmerich!
Some really nice detail here
Just a couple of observations, to help you go even deeper…
In actual fact =
is not a comparative operator, but an assignment operator. It doesn’t compare, it assigns e.g. let myVariable = 4 + 9;
Correctly written, your example of a comparative operator should be:
13 == 4 + 9 // equal to (in value) operator
// or
13 === 4 + 9 // strict equality / identical (both value AND type) operator
NIce!
By the way…
… the NOT operator !
is actually a unary operator, as well as a logical operator (it’s not a binary operator). Unary operators perform an action on just one value (which can also be an expression). You’ll learn about some more of them later in the course (e.g. ++
and --
).
Nice answers @AF90!
I can see you’ve put a lot of thought into the concepts
Just one thing to clarify…
… only two values (before and after). There is also something called a ternary operator that performs an action on 3 values. Look it up if you haven’t heard of it… it’s pretty cool
Haha yeah, not sure how I got to that. I think I was a little tired after taking in all the info in chapter 1 and rushed these answers.
- What are operators?
An operator is a symbol or symbols that direct the console to execute a defined function.
- What binary operators do you know?
*, /, +, -, %, <, >, ==, <=, >=, &&, ||, !=
- What logical operators do you know?
||, &&, !,
- What are operators? Basically signs of operations between values
- What binary operators do you know? Yes/No, True/False, On/Off
- What logical operators do you know? And, Or, Not
-
What are operators?
Operators are what allow us to manipulate values. -
What binary operators do you know?
<, >, +, -, =<, =>, == -
What logical operators do you know?
and, or, not
&& , ||, !
1. What are operators?
An operator performs one type of operation on single or multiple data inputs and produces an output.
2. What binary operators do you know?
Binary operators produces a result when comparing two data inputs. Some examples:
+, -, *, /, %, ==, !=, ===, !==, <, >, <=, >=, &&, ||
3. What logical operators do you know?
- unary logical operators : (!x) - not
- binary logical operators : (x && y) - and; (x || y) - or
- ternary logical operators: (x ? y : z) - conditional
-
operators are symbols eg + - <> used to manipulate values
-
<, >, =, >=, <=, !=, ==.
-
&&, ||, !
- What are operators?
An operater is an action object that executes a functions on value. Eg. +,-,/,*,%,= etc
- What binary operators do you know?
<> ±, Binary operators are sets of two opposing fucntions.
- What logical operators do you know?
&& and, or || , not!
1 What are operators?
An operator (by performing some operation) is giving data value’s a output (result). Arithmetic operators for example operates on numbers.
2 What binary operators do you know?
It is an operator that perform an operation with two operands. For example a+b (operand) a (operator) + (operand) b
3 What logical operators do you know?
||;&&;!
1. What are operators?
Operators are used in order to take written values and computate new values from them.
2. What binary operators do you know?
+, >, <, *, /,%,
3. What logical operators do you know?
&& || !
example:
true && true = true
true || false = true
!false = true