Bash Loop Through Array Javascript Append Text