I am trying to learn conditional statements in JavaScript, when I called the function with passing no argument still I am getting the x is equal to y. I don't understand where I m missing the code.
function tryMe(x, y) {
if (x == y) {
console.log("x and y are equal");
} else if (x > y) {
console.log("x is greater than y");
} else if (x < y) {
console.log("x is less than y")
} else {
console.log("no values")
}
}
tryMe();
This is my console log:
x and y are equal // i am expecting it to console.log("no values")