Sum Value In Array Javascript Methods Syntax Error