VOOZH about

URL: https://www.geeksforgeeks.org/javascript/greater-than-comparison-operator-in-javascript/

⇱ Greater than(>) Comparison Operator in JavaScript - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Greater than(>) Comparison Operator in JavaScript

Last Updated : 23 Jul, 2025

JavaScript Greater Than(>) Operator is used to compare two operands and return true if the left operand has a higher value than the right operator.

Syntax:

a>b

Example 1: In this example, we will compare String, Number, and Boolean using Greater Than Operator.

Output: The String and Boolean values are converted to Numbers and compared.

true
false
true

Example 2: In this example, we will compare BigInt, and other data types Greater Than Operator.

Output: Similar to the previous example the data type is converted to number and comparison is performed

false
true
false
false

Supported Browsers:

  • Chrome
  • Edge
  • Firefox
  • Opera
  • Safari

We have a complete list of JavaScript Comparison Operators, to check those please go through, the JavaScript Comparison Operator article

Comment
Article Tags: