85.0k views
1 vote
In this case:

var a = 6, b = "ten";


if ( a < b || b < a ) {


alert("this is true!");


}


the alert will not be run. It seems that a

1 Answer

5 votes

Answer:

I'm sure that code is JS,

so the problem is you are using the < > operator with a number and a string. This is a comparison operator and wouldn't work with any other type than number

User Simen Echholt
by
4.6k points