For this situation, i[1] is the character 0. You're comparing a char against an int. The number equivalent of the character 0 is 48. Since 0 == 48 is false, no alert is displayed.
Your comparison is using the wrong type. When you use an indexer with a string, the result is a char. Your if statement is using an int. You need to change your code to:
i[1]is the character0. You're comparing acharagainst anint. The number equivalent of the character0is 48. Since0 == 48isfalse, no alert is displayed.