<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Array on Samarthya</title><link>https://samarthya.me/tags/array/</link><description>Recent content in Array on Samarthya</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© Samarthya 2018-2026. All rights reserved.</copyright><lastBuildDate>Sun, 15 Dec 2019 12:00:00 +0000</lastBuildDate><atom:link href="https://samarthya.me/tags/array/index.xml" rel="self" type="application/rss+xml"/><item><title>JS Reduce and forEach</title><link>https://samarthya.me/posts/js-reduce-and-foreach/</link><pubDate>Sun, 15 Dec 2019 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/js-reduce-and-foreach/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt="Matrix"&#10; width="4096"&#10; height="2304"&#10; src="https://samarthya.me/posts/js-reduce-and-foreach/img_20160902_171750_hu_98c582a5f9430fd4.jpg"&#10; srcset="https://samarthya.me/posts/js-reduce-and-foreach/img_20160902_171750_hu_98c582a5f9430fd4.jpg 800w, https://samarthya.me/posts/js-reduce-and-foreach/img_20160902_171750_hu_91eec9143170a7c8.jpg 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/js-reduce-and-foreach/img_20160902_171750.jpg"&gt;&lt;/figure&gt;&#10;&lt;p&gt;I have been polishing my Go and JS skills recently and today learned about how to use the &lt;a href="https://www.w3schools.com/jsref/jsref_reduce.asp" target="_blank" rel="noreferrer"&gt;reduce&lt;/a&gt;() and &lt;a href="https://www.w3schools.com/jsref/jsref_foreach.asp" target="_blank" rel="noreferrer"&gt;forEach&lt;/a&gt;() method. The problem I was trying to solve was return columns and rows from an input string.&lt;/p&gt;</description></item></channel></rss>