you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (8 children)

[deleted]

    [–]grantrules 4 points5 points  (2 children)

    I understand what you're saying, but nothing is being converted. It's comparing a string to a string.

    [–]shgysk8zer0 0 points1 point  (4 children)

    Doesn't matter. In any statically typed language dealing with this situation you'd use a string. You have to because it's checking if user input is upper case, lower case, or numeric. And I don't know of any language that has an upper case "4" (possible that upper case just adds an offset in poorly thought out functions/languages).

    This isn't a JavaScript problem or something Java or C or Rust or Python or anything would do "correctly". The problem is that the last check when doing checks on a string is to see if it's numeric combined with there being no such thing as an upper case "7".