How to get if true or false


#1

how to get true or false string


#2

You can ask the computer to compare two things and it will tell you if the comparison is true or false.

There are several comparison operators that you can use. This JavaScript exercise introduces you to six of them.

So, to make this work,

  1. pick two things, to keep it simple, make it two integers
  2. pick a comparison operator
  3. put them into your if statement like this: if ( 123 > 456 )

If the result of that comparison is true then the code in the { } after the if will run.
If the result of that comparison is false then the code in the { } after the else will run.