I want to know how I can avoid automatic coercion when comparing numbers using the less than and higher than operator in JavaScript.
For example, I already know that == operator makes type coercion, for example:
1 == '1'; //true
And === operator doesn't, for example:
1 === '1'; // false
But, how I can avoid this when comparing numbers?, for example:
1<2; //true
1<'2'; //true
1<'0'; //false
I want to avoid this automatic type coercion.