Operators

Let's compare some variables!
Make sure to complete your work in the console.

These variables have been created for you:

    var a = 'General';
    var b = 'General';
    var c = 'Assembly';
    var x = 10;
    var y = '10';
    var z = 88;

The operators you have available are:

    ==      // equal
    !=      // not equal
    ===     // strict equal
    !==     // strict not equal
    >       // greater than
    >=      // greater than or equal
    <       // less than
    <=      // less than or equal
  1. Check if variable a is equal to variable b.
    • Answer: true
  2. Check if variable a is equal to variable c.
    • Answer: false
  3. Check if variable x is equal to variable y.
    • Answer: true
  4. Check if variable x is equal to variable y, and that it is of the same data type.
    • Answer: false
  5. Check if variable x is less than or equal to variable y.
    • Answer: true
  6. Check if variable x is greater than variable z.
    • Answer: false
  7. Check if variable z is greater than or equal to variable y.
    • Answer: true
  8. Check if variable x is not equal to variable a.
    • Answer: true
  9. Check if variable x is not equal to variable y.
    • Answer: false
  10. Check if variable x is not equal to variable y, or that it is not of the same data type.
    • Answer: true