ã¯ããã« ã¨ããæ¬ã®æ¤è¨¼ã®ããã«ãJavaScript(æ£ç¢ºã«ã¯ECMAScript-262 5.1)ã®ä»æ§æ¸ãèªãã ããã¦ãããã¨ããã®ããJavaScriptã®å ´åã大æµã®ã¡ã½ããã«ã¤ãã¦ã¯ãã©ã®ããã«å®è£
ãããã¹ãããã¨ããã¢ã«ã´ãªãºã ãå®ç¾©ããã¦ããããããè¦ãã°ã©ãããæåã«ãªã£ã¦ããã®ãããããããã§ãã詳細ã«ã¤ãã¦ã¯ãArray.prototype.reduce() - JavaScript | MDNã¨ããä¿¡é ¼ã§ããããã¥ã¡ã³ããããã®ã§ããã¡ãã«è²ãã¨ãã¦ãããããreduceã¨ã¯ä½ãªã®ãã«ã¤ãã¦ããã£ãããªã®ã§ã調ã¹ããã¨ãã¡ã¢ãã¦ããã¾ãã reduceã¨ã¯ ä¸è¬çã«ãreduceã¨ããã®ãä¸è¨ã§èª¬æããè¨èã¨ãã¦ãæãããã¿æä½ãã¨ããè¨èã使ããããã¨ãå¤ãã§ããã©ããããã¨ãã¨ããã¨ãå®ä¾ã¨ãã¦ãææ¸ã«é »åºãã表ç¾ã使ãã¾ãã¨: [1, 2, 3, 4].red
{{#tags}}- {{label}}
{{/tags}}