logo
logo

Compare Numbers

Beginner

Compare Numbers

Create a function called
compareNumbers
that takes in two numbers as arguments and returns a string.

The string should be "Number 1 is greater than Number 2" if the first number is greater than the second number, "Number 1 is less than Number 2" if the first number is less than the second number, and "Number 1 is equal to Number 2" if the two numbers are equal.

Console
Submit
Solution
00:00