The greater than operator (
>) compares the values of two numbers. If the number to the left is greater than the number to the right, it returns
true. Otherwise, it returns
Like the equality operator, greater than operator will convert data types of values while comparing.
5 > 3 // true
7 > '3' // true
2 > 3 // false
'1' > 9 // false
greater than operator to the indicated lines so that the return statements make sense.