Bash Read String Into Array Javascript Function Syntax