No need for a method, there is already a simple regular expression char which does this:

```
var isAlphaNum = 'foo1'.match(/\w+/);
```