Coding Challenge: Return The Smaller String
if (!isNaN(str1[i]) &amp;&amp; !isNaN(str2[i])) { // if both chars are numbers, return str with numerically smaller number
          return parseInt(str1.slice(i)) &lt; parseInt(str2.slice(i)) ? str1 : str2;
        }


seems like a bug. In case the numbers compare equal the code blindly returns the first string. Consider (a10c, a10b).



return str1; // if we get here then both strings are equal and either can be returned


seems like another bug. At this point we only know that the strings are equal up to the length of the shortest one, and the shortest one should be returned. Which one is shortest is not tested here.



The overall logic looks overcomplicated. Consider testing for numbers first; that would eliminate the need for a confusing toUpper/toLower mess, and the special case of special characters.