Title:
JavaScript Operators
Updated:
October 26, 2023
Task/Activity:
  1. Questions
  2. Coding Problems
A. Questions
  1. What are the comparison operators used for?
Figuring out how one value compares to another value, i.e. 1 >= 2 is false.
  1. Explain the difference between the logical AND operator (&&) and the logical OR operator (||).
The AND operator will only provide a true value if both contained values are equal to true. OR will provide a true value even if only one contained value is equal to true.
  1. Which operator would you use to find the remainder from dividing 2 numbers.
The modulus(%) operator.
  1. Which operator would you use if you wanted to find out if two values were NOT equal?
I believe that you would use something along the lines of a!=b.
E. Coding Problems

See the 'script' tag below this section. You will have to write some JavaScript code in it.

Always test your work! Check the console log to make sure there are no errors.