Join Items In Array Javascript Function Syntax