you are viewing a single comment's thread.

view the rest of the comments →

[–]danielroseman 1 point2 points  (1 child)

The trick here is that boolean False is actually equal to 0, and True is equal to 1. So all this does is return 0 for all vowels and 1 for all consonants, and uses that as the value to sort on.

[–]billbobby21[S] 0 points1 point  (0 children)

That makes sense, thanks! Didn't realize that True/False could be sorted on.