Adding Array Items Javascript Function Syntax