Update index.js

Fixed typo (lable)
Replaced shift loop with splice
Removed unused dependency (map is natively available on arrays)
Removed code which will never be used (array[array.length] will always be undefined)
this was actually an error slipped form the project the library come from
it should have been
```javascript
(table[table.length-1] === undefined) && table.pop();
```
but it's a real case needed when the command outputs a new line as last thing :)
Thx for the hint :+1: