Comparisons

So far we've learned about three data types:

strings (e.g. "dogs go woof!")

numbers (e.g. 4, 10)

booleans (e.g. false, 5 > 4)

Now let's learn more about comparison operators.

List of comparison operators:

Greater than

< Less than

<= Less than or equal to

= Greater than or equal to

=== Equal to

!== Not equal to

Instructions

Try to use each of the operators above.

Choose the correct comparison operator to make each of the four statements print out true.

?

Hint

Get live, fast support from Codecademy Advisors when you get stuck.

Learn more.

When you use the .length, the value that is returned is a number. Therefore, when you enter something like "Jenny".length === 5;, the computer is evaluating whether the number of letters in Jenny is equal to 5.