90 >= str.charCodeAt(i) >= 65 evaluates as a single statement, left to right. It’s equivalent to this:

(90 >= str.charCodeAt(i)) >= 65

90 >= str.charCodeAt(i) will evaluate to true or false, which are then coerced to numbers (true becomes 1 and false becomes 0) before being compared with 65. Both 0 and 1 are less than 65, so this comparison will always evaluate to false.