a[0] and a.shift() return the same thing. I would do
```javaScript
a = ('' + a[0]).toLowerCase();
```
and just use that in both locations.