Bash Loop Through Array Variable Javascript Interview