Javascript - Write program to compare two integer values

Requirements

Write program to compare two integer values.

Choose the correct comparison operator to

  • display "true", for 5 is less than 7.
  • display "true", for 10 is greater than 7.
  • display "true", for 10 is equal to 10.
  • display "true", for 10 is NOT equal to 8.

Demo

console.log( 5 < 7 );
console.log( 10 > 7 );//from   w ww .  ja va 2s .c  o m
console.log( 10 == 10 );
console.log( 10 != 8 );

Result