Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

JavaScript - Comparisions

Comparisions used to compare two values of numbers or strings.

List of expressions used to compare values.

  • == - used to check for equality of two values.
  • <= - used to check for less than or equals of two values.
  • >= - used to check for greater than or equals of two values.
  • < - used to check for strict less than of two values.
  • > - used to check for strict greater than of two values.
  • != - used to check for not equality of two values.
let isLessThan = (age < 25);
let isLessThanEquals = (age <= 25);
let isGreaterThan = (age > 25);
let isGreaterThanEquals = (age >= 25);
let isEquals = (age == 25);
let isNotEquals = (age != 30);
let isNamesEqual = ("name" == "name")