Comparison operators Flashcards
===, !==, >, and <= are ________ operators.
comparison
What is the comparison operator for is not equal to?
!==
What is the comparison operator for is greater than?
>
What is the comparison operator for is less than or equal to?
<=
Code the first line of an if statement that tests whether num1 is greater than num2.
if (num1 > num2) {
Code the first line of an if statement that tests whether num1 is greater than or equal to num2.
if (num1 >= num2) {
Code the first line of an if statement that tests whether one variable is unequal to another.
if (firstName !== nickname) {
Code the first line of an if statement that tests whether a variable has a different value from a particular string.
if (gender !== “female”) {
Code the first line of an if statement that tests whether a variable is less than a particular number.
if (num < 1) {
Code the first line of an if statement that tests whether the value represented by a variable is greater than or equal to the value represented by another variable.
if (num1 >= num2) {
Code the first line of an if statement that tests whether a string is unequal to the value represented by a particular variable.
if (“Mexico” !== countryOfOrigin) {