DJ Adams<p>TIL about the subtlety of the optional initialValue parameter for the Array prototype's reduce method in JS.</p><p><a href="https://qmacro.org/blog/posts/2025/04/29/array.prototype.reduce-and-the-optional-initial-value/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">qmacro.org/blog/posts/2025/04/</span><span class="invisible">29/array.prototype.reduce-and-the-optional-initial-value/</span></a></p><p>Too obvious ... or worth pointing out? Anyway, hope someone gets something out of this micro realisation.</p><p><a href="https://hachyderm.io/tags/TIL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TIL</span></a> <a href="https://hachyderm.io/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://hachyderm.io/tags/FP" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>FP</span></a> <a href="https://hachyderm.io/tags/HandsOnSAPDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HandsOnSAPDev</span></a> <span class="h-card" translate="no"><a href="https://a.gup.pe/u/sap" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>sap</span></a></span></p>