I have two variables, both containing text and numbers and I'm getting the wrong result when comparing them:
var x = "test_8"
var y = "test_11"
if(x > y){
alert(x+" is greater than "+y);
}
else{
alert(y+" is greater than or equal to "+x);
}
I get the alert saying test_8 is greater than test_11 but I should be getting the other alert. I'm guessing I would have to extract the 8 and 11 out as numbers but I'm not sure how to do that.