Tasksoperators.md - brainchildservices/curriculum GitHub Wiki

Exercise:

Task 1

Choose the correct comparison operator to alert true, when x is greater than y.

 x = 10;
 y = 5;
 alert(x  y);

Task 2

Choose the correct comparison operator to alert true, when x is equal to y.

 x = 10;
 y = 10;
 alert(x ? y);

Task 3

 x = 10;
 y = 5;
 alert(x ? y);

Task 4

 var age = n;
 var voteable = (age ? 18) ? "Too young" ? "Old enough";
 alert(voteable);