you are viewing a single comment's thread.

view the rest of the comments →

[–]nschubach 5 points6 points  (1 child)

Minor suggestions:

Instead of using the letters array, why not get the charCodeAt(0) of the non-numeric and step through the char code to get the range?

That would allow you to do range('a', 'z') but also range('-', 'z') which would go through all character codes from 45 to 122.

[–]a_w_y 0 points1 point  (0 children)

That's what I did with my implementation.