Challenge Comparison With The Greater Than Operator - thelastmile/FreeCodeCamp GitHub Wiki
Challenge Comparison with the Greater Than Operator
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 false
.
Like the equality operator, greater than operator will convert data types of values while comparing.
Examples
5 > 3 // true
7 > '3' // true
2 > 3 // false
'1' > 9 // false