x = 10;
y = 5;
alert(x > y);
Why does it not alert “10 > 5” but “true” ?
because the comparison is resolved first, the result of comparison is then displayed in an alert message
to achieve what you want, use a string (with variable if you want)