Ajax-loader-large-white
Conditionals and Control Flow
Comparisons

So far we've seen:

  • strings (e.g. "dogs go woof!")
  • numbers (e.g. 4, 10)

Now let's learn 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

On line 8, use a comparison operator to compare two numbers. Make sure to end your line of code with a semicolon.

index.php
project
View Preview