Swift Foreach Array Javascript Append String