In Lisp, this'd be exactly the job for reduce . You'd see this kind of code: DEMO (reduce #'+ '(1 2 3)) ; 6. Fortunately, in JavaScript, we also have reduce ...
確定! 回上一頁