Reduce Function Array Javascript Methods Syntax