According to ecma-262
When using 'str' < 'str2'
7.2.13 Abstract Relational Comparison
If Type(px) is String and Type(py) is String, then
If IsStringPrefix(py, px) is true, return false.
If IsStringPrefix(px, py) is true, return true.
Let k be the smallest nonnegative integer such that the code unit at index k within px is different from the code unit at index k within py. (There must be such a k, for neither String is a prefix of the other.)
Let m be the integer that is the numeric value of the code unit at index k within px.
Let n be the integer that is the numeric value of the code unit at index k within py.
If m < n, return true. Otherwise, return false.
At no moment occurs an integer conversion (at least not in the way you mean)
Algorithm would be something like
if (str1.startsWith(str2)) return false
if (str2.startsWith(str1)) return true
for (let i = 0; i < str1.length; ++i) {
if (str1[i] !== str2[i]) {
k = i;
break;
}
}
return str1.codePointAt(k) < str2.codePointAt(k)
So you can use operator < with string on both side (whether they hold an "int" or not).
Now does it makes sense to get '10' < '100', likely not but depends on your usecase.