Boolean Expressions Reading assignment

  1. Operators apply actions to values, both side of the operators and give new value.
  2. +, -, *, / and also == means equal to, ! means not equal to, < means less than to, <= means less than or equal to, > means greater than to, >= means greater than or equal to
  3. ! means not, && means and, || means or
1 Like

1-2 : Symbols, for example ( *,+,-,/) that make your mathematical operation to change based on what operator we used. let’s say we have 5 and 3. They are just numbers, values. only when we use operators we can get a result.
3 + 5 = 8
3 * 5 = 15
Etc…

3: and (&&), or (||), not (!)

1 Like
  1. ±*/ symbols are called operators.
  2. arithmetic (+, -, *, /, and %), string concatenation (+),
    comparison (==, !=, ===, !==, <, >, <=, >=)
  3. && || !
1 Like
  1. ***What are operators? different way to interact with 1, 2 or more values

  2. ***What binary operators do you know?

arithmetic (+, -, *, /, and %)
string concatenation (+)
comparison (==, !=, ===, !==, <, >, <=, >=)
logic (&&, ||)

  1. ***What logical operators do you know?
    logic (&&, ||) which are AND, OR
1 Like
  1. What are operators?
    Operators are elements that can manipulate a value, perform arithmetic operations ,or can assign or compares values.

  2. What binary operators do you know?

=>
<
<=

!=
3. What logical operators do you know?
&& logical and
|| logical or
! logical not

2 Likes
  1. What are operators?
  • Operators are tools that can perform activities with given values, such as:
    – Arithmetic operators - used for calculations, like + ; - ; * ; / and % (remainder). For example, if you type 3 + 2, the operator takes both values around it and sums them. Arithmetic operators follow the normal precedence you would use in mathematics. You can also use () if needed. Operator + can also be used on strings - it joins them together.
    – Comparison operators - used to compare values. They are < ; > ; == ; != ; >= ; <= ; === ; !== . They compare given values and bring a boolean value of true or false, if you have given true or false statement.
    – Logical operators - AND && and OR || . They find out if the given values are true and bring boolean value. && brings true if both are true. || brings true if at least one is true. Otherwise, they bring false. There is also one called Conditional true ? _ : _ , which brings second value, if the first one is true, and third value, if the first one is false.
    – Unary operators - operate only on one value. For example, typeof operator brings type of the value you give it.
  1. What binary operators do you know?
  • Binary operators are the ones that operate with two values, like most of the arithmetic and comparison operators I mentioned. Exceptions are minus - , which can be used to make one value negative, or conditional true ? : , which uses three values.
  1. What logical operators do you know?
  • && and
  • || or
  • true ? : conditional
1 Like

What are operators?

  • Arithmetic symbols like ( + and * and - and /) are called operators.

  • Putting an operator between two values will apply it to those values and produce a new value.

  • When operators appear together without parentheses, the order in which they are applied is determined by the precedence of the operators.

  • When multiple operators with the same precedence appear next to each other, they are applied left to right.

  • Can use parentheses to prioritize a part of the arithmetic/operation.

  • % symbol is used to represent the remainder operation (also often referred to as modulo), which gives you the remainder of dividing X by Y.

  • The remainder operator’s precedence is the same as that of multiplication & division.

What are special numbers?

  • There are 3 special values in JavaScript that are considered number but don’t behave like normal numbers.

  • First 2 are “Infinity” and “-Infinity”, which represent the positive and negative infinities.

  • NaN stands for “not a number”, even thought it is a value of the number type, you’ll get this result when you for example try to calculate “0 / 0”, Infinity - Infinity, or any number of the other numeric operations that don’t yield a meaningful result.

What are strings?

  • Strings are used to represent text.

  • Written by enclosing their content in quotes.

  • Can use single quotes, double quotes, or backticks, as long as the quote at the start and the end of the string match.

  • Newlines (the characters you get when your press ENTER), can be included without escaping only when the string is quoted with backticks (`).

  • When a backslash () is found inside quoted text, it indicates that the character after it has a special meaning, this is called escaping the character.

  • A quote that is preceded by a backslash will not end the string but be a part of it.

  • When an “n” character occurs after a (). It is interpreted as a newline.

  • “ t “ after a () means a tab character.

  • String cannot be divided, multiplied, or subtracted, but the "+” operator can be used on them.

  • It doesn’t add, but it concatenates — glues two strings together. e.g = “con” + “cat” + “e” + “nate” to get the string “concatenate”.

  • Backtrack-quoted strings, usually called template literals, can do a few more tricks than single or double quotes.

What are unary operators?

  • Some operators are not symbols and are written as words.

  • “typeof” operator is one of them that produces a string value naming the type of the value you give it.

  • Operators that use two values are called binary operators, while those that take one are called unary operators.

  • The minus operator can be used both as a binary operator and as a unary operator.

What are boolean values?

  • JavaScript has a boolean type, which has just two values, true and false, which are written as those words.

  • There is only one value in JavaScript that is not equal to itself, and that is NaN (“not a number”).

What are logical operators?

  • There are some operations that can be applied to boolean values, JavaScript supports three logical operators: and, or, and not.

  • Can be used to “reason” about booleans.

  • The “&&” operator represents logical and, it’s a binary operator, and its results is true only if both the values given to it are true.

  • The “||” operator denotes logical or, it produces true if either of the values given to it is true.

  • The “!” logical unary operator represents not, that flips the value given to it — !true produces false, and !false gives true.

  • “?” the conditional operator also a ternary operator which works on three values, the value on the left of the question mark “picks” which of the other two values will come out. When it is true, it choose the middle value, and when it is false, it chooses the value on the right.

1 Like

This is quite a brilliant and in-depth answer. You nailed all the fundamentals ! Keep up the amazing work.

Happy Learning :slight_smile:

2 Likes
  1. In Javascript, Operators are symbols or words that are used to perform operations. (+,-,/,*,Unary, arithmetic, relational, bitwise, logical,ternary, assignment) operators.
  2. Operators that use two values/elements to produce another value/element.
  3. Boolean=true/false. conditional operator ? value :. Logical operators interject logic into a statement in the form of “and”, “or”, “not”. “And” result is true only if both the values given to it are true. “OR” produces true if either of the values given to it is true. “NOT” is a unary operator that flips the value given to it—!true produces false, and !false gives true. per book reading.
1 Like
  1. What are operators?
    Operators are used to manipulate data in a program. For example, the ‘+’ symbal is an arithmetic operator and is used for addition. There are other operators that do assignment, comparison, and string operators to name just a few.

  2. What binary operators do you know?

, <, ==, !=, !==, >=, <=, ===

  1. What logical operators do you know?
    &&, ||, !
1 Like
  1. An operator is a function within Javascript that is represented by a single of set of symbols (or words) that when provided input will provide an output. They are essentially functions that can be performed, and come in unary, logical, and arithmetic varieties.

  2. Some binary operators include:
    “==” is operator for equal to
    “>” is the operator for greater than comparator
    “<” is the operator for less than operator
    “!” is the operator for not
    “&&” is the operator for logical and
    “||” is the operator for logical or
    “+” is the operator for addition
    “-” is the operator for subtraction
    “*” is the operator for multiplication
    “/” is the operator for division

  3. Some logical operators include:

    “&&” is the logical operator for and
    “||” is the logical operator for or
    “!” is the logical operator for not
    “? ;” is the logical operator for the conditional operator

1 Like

Answers:

  1. Operators are the operation on data in an expression. E.g like + - * / %

  2. Binary operators comparison operators between 2 set of values. E.g will be like > greater than < less than, == equals to… etc

  3. I know about &&, || and ! as logical operators. It basically represent “and”, “or” and “not”. These operators were applied to Boolean values.

1 Like
  1. OPERATORS are datatypes used in expression with one or more values to perform a operation and return a result value

2.operator that uses two values are called binary opreators .
Assignment operator += ,-= , *= ,/=
e.g a=a+b for operator +=

   Comparison operators  ==, != , >= ,<= 
   eg   1==2  returns  false  

3.logical operators are applied to boolean values themselves.boolean values are true and false.
logical operators are AND ,NOT and OR
&& represents logical AND
II represent logical OR
! represents logical NOT
e.g a=3 and b= 5
! (a>b) returns true

1 Like

1. What are operators?

Operators are used to performs operations, assign value, perform arithmetic, compare values or logic.

2. What binary operators do you know?

Equal to (==), Greater than (>), less than (<), and mathematical operations.

3. What logical operators do you know?
And (&&), Or (||), and Not (!).

1 Like

What are operators: A symbol that tells the interpreter to perform a mathematical operation to produce a result.
What binary operators do you know: < less than, > greater than, == equal to, != not equal to
What logical operators do you know: and, or and not.

1 Like
  1. Operators manipulate values.

  2. +, -, *, /, %

  3. &&, ||

2 Likes
  1. What are operators?
    Operators act on values. Adding, dividing, compare etc. values.

  2. What binary operators do you know?
    +, -, *, /, %, ==, !=, ===, !==, <, >, <=,>=, &&, ||

  3. What logical operators do you know?
    and &&
    or ||
    not !

2 Likes

1.) JavaScript operators are used to assign values, compare values, perform arithmetic operations, and more.

2.) Binary operators are the common ones like +, -, /, *, <,>, !=, etc… These you use with two objects, like : 1 + 2

3.) Logical operators are used to determine the logic between variables or values. && (and), || (or), !(not)

2 Likes
  1. Operators are values used to generate an outcome from other values.
  2. I know these binary operators: >, =>, <, <=, ==, !=, ===, !===
  3. I know these logical operators: ||, &&, !
1 Like
  1. Operators manipulate values

  2. Equal (==)
    Not equal (!=)
    Less than (<)
    Greater than (>)
    Greater than or equal to (>=)
    Less than or equal to (<=)
    Logical AND (&&)
    Logical OR (||)
    Plus (+)
    Minus (-)
    Multiplication (*)
    Divide (/)

  3. And (&&)
    Or (||)
    Not(!)

1 Like