Conditionals and Control Flow 1/4

Comparisons
So far we've seen:
  • strings (e.g. "dogs go woof!")
  • numbers (e.g. 410)
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.
?
Hint
Test how well you're learning and fill in gaps with Codecademy Pro.Learn more.
Here's how to compare that 6 is less than 7:
<p>

  <?php
    6 < 7;
  ?>

</p>
Conditionals and Control Flow 1/4
        <html>
  <head>
    <title>Comparing Numbers</title>
  </head>
  <body>
    <p>
      <?php
         6 < 7; 
      ?>
    </p>
  </body>
</html>

Comments

Popular posts from this blog

MEGA 暫存檔案刪除

IOS GCD多執行緒

利用CMD指令強制刪除