<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kapil Thukral on Medium]]></title>
        <description><![CDATA[Stories by Kapil Thukral on Medium]]></description>
        <link>https://medium.com/@kapilthukral?source=rss-f1bae610dbd4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6Ut_uwevXm2kSV8N.</url>
            <title>Stories by Kapil Thukral on Medium</title>
            <link>https://medium.com/@kapilthukral?source=rss-f1bae610dbd4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 02:58:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kapilthukral/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Iterables in Javascript]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://kapilthukral.medium.com/iterables-in-javascript-e5d99152f248?source=rss-f1bae610dbd4------2"><img src="https://cdn-images-1.medium.com/max/1468/1*qxCKGHARqeZZOPuLZ18wWg.png" width="1468"></a></p><p class="medium-feed-snippet">Iterables are objects that implement the Symbol.iterator method, that makes any object iterable using &#x201C;for of&#x201D; loop.</p><p class="medium-feed-link"><a href="https://kapilthukral.medium.com/iterables-in-javascript-e5d99152f248?source=rss-f1bae610dbd4------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://kapilthukral.medium.com/iterables-in-javascript-e5d99152f248?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5d99152f248</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Thu, 15 Jan 2026 13:28:12 GMT</pubDate>
            <atom:updated>2026-01-15T13:33:38.871Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Async mapLimit]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Similar Question on GreatFrontEnd: https://www.greatfrontend.com/questions/javascript/map-async-limit</p><p class="medium-feed-link"><a href="https://kapilthukral.medium.com/async-maplimit-9d9fcc19b172?source=rss-f1bae610dbd4------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://kapilthukral.medium.com/async-maplimit-9d9fcc19b172?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d9fcc19b172</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Tue, 13 Jan 2026 07:59:50 GMT</pubDate>
            <atom:updated>2026-01-13T08:04:13.299Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Defer Non-Critical CSS and load them asynchronously]]></title>
            <link>https://kapilthukral.medium.com/defer-non-critical-css-and-load-them-asynchronously-8ce46c22b159?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ce46c22b159</guid>
            <category><![CDATA[asynchronous-css]]></category>
            <category><![CDATA[non-critical-css]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Wed, 15 Jun 2022 16:32:48 GMT</pubDate>
            <atom:updated>2022-06-15T16:32:48.616Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>&lt;link rel=”preload” href=”styles.css” as=”style” onload=”this.onload=null;this.rel=’stylesheet’”&gt;</blockquote><blockquote><strong>Fallback option:</strong><br>&lt;noscript&gt;&lt;link rel=”stylesheet” href=”styles.css”&gt;&lt;/noscript&gt;</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ce46c22b159" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Checking typeof for different javascript variables]]></title>
            <link>https://kapilthukral.medium.com/checking-typeof-for-different-javascript-variables-935cb0cada31?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/935cb0cada31</guid>
            <category><![CDATA[datatypes-in-javascript]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Sat, 04 Jun 2022 03:41:02 GMT</pubDate>
            <atom:updated>2022-06-04T03:41:02.004Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f3f2d59ed56b8a905f3b7397b3873583/href">https://medium.com/media/f3f2d59ed56b8a905f3b7397b3873583/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=935cb0cada31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing inheritance in constructor functions]]></title>
            <link>https://kapilthukral.medium.com/implementing-inheritance-in-constructor-functions-ee3a41df1b6?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee3a41df1b6</guid>
            <category><![CDATA[inheritance]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Sun, 29 May 2022 15:50:30 GMT</pubDate>
            <atom:updated>2022-05-29T15:50:30.083Z</atom:updated>
            <content:encoded><![CDATA[<p>Child.prototype.__proto__ will be Parent.prototype</p><p>In the Child’s constructor function make sure to call Parent’s constructor function to imitate super()</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e5ad74e10edd266f7e06eddb32363fe9/href">https://medium.com/media/e5ad74e10edd266f7e06eddb32363fe9/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*nVVMbQMpYUpQs0xeNfzsEw.png" /><figcaption>class Rabbit extends Animal</figcaption></figure><p>__proto__ is being denoted as [[Prototype]]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee3a41df1b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSS selectors]]></title>
            <link>https://kapilthukral.medium.com/css-selectors-d72d2995a466?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/d72d2995a466</guid>
            <category><![CDATA[css-selectors]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Wed, 06 Oct 2021 05:40:36 GMT</pubDate>
            <atom:updated>2021-10-06T06:01:54.851Z</atom:updated>
            <content:encoded><![CDATA[<p>CSS selectors that I generally keep forgetting:</p><p>MDN doc link: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors">https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*-sp5XBCPao-1yAuINLvgFg.png" /></figure><h4>Attribute Selectors</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*K4yOcETVK3AGlT_dS_AI4g.png" /><figcaption>attribute selectors</figcaption></figure><p>MDN doc link: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors">https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d72d2995a466" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simulating Tic Tac Toe]]></title>
            <link>https://kapilthukral.medium.com/simulating-tic-tac-toe-73910c08f77b?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/73910c08f77b</guid>
            <category><![CDATA[tic-tac-toe]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[brute-force]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Mon, 20 Sep 2021 07:01:42 GMT</pubDate>
            <atom:updated>2022-05-04T08:42:46.445Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>To Prove:</strong> In Tic Tac Toe, the probability of winning for the player who takes the first turn is more than the player who takes the second turn.</p><p><a href="https://gist.github.com/Programero/5017b0d813f9785c873a183135089368.js"><strong>Proof</strong></a>: We try to simulate all the possible cases and find out the cases in which player First wins and the cases in which player two wins and the cases which results in a tie.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c35a1a23468b0ae038ae9e820b2f274f/href">https://medium.com/media/c35a1a23468b0ae038ae9e820b2f274f/href</a></iframe><p>So, the probability of player1 winning is: 131184/255168 = 0.514 and the probability of player 2 winning is: 77904/255168 = 0.305 and the probability of a tie is: 46080/255168 = 0.181</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73910c08f77b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Function Currying]]></title>
            <link>https://kapilthukral.medium.com/function-currying-67c5461e0634?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/67c5461e0634</guid>
            <category><![CDATA[function-currying]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[closure]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Wed, 15 Sep 2021 10:09:47 GMT</pubDate>
            <atom:updated>2021-09-15T10:09:47.024Z</atom:updated>
            <content:encoded><![CDATA[<p>Implementation of lodash library’s _.curry method</p><p>Keep collecting all the arguments untill all the expected number of arguments(fnToCurry.length) aren’t received and at last call the fnToCurry with all the arguments.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b8796f782f8ae5702c3a36ee2208d7e/href">https://medium.com/media/3b8796f782f8ae5702c3a36ee2208d7e/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67c5461e0634" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Taking notes from Javascript: The Good Parts]]></title>
            <link>https://kapilthukral.medium.com/taking-notes-from-javascript-the-good-parts-c61490255348?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c61490255348</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-the-good-parts]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Sun, 12 Sep 2021 09:27:40 GMT</pubDate>
            <atom:updated>2021-09-12T09:27:40.256Z</atom:updated>
            <content:encoded><![CDATA[<h3>Object.create, Object.setPrototypeOf, Object.getPrototypeOf, .__proto__</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8e9500b338e5a383f1774d98debb5aa/href">https://medium.com/media/e8e9500b338e5a383f1774d98debb5aa/href</a></iframe><h3>Prototype linking can only be used for retrieval</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/771d5f54249275b108f8624fdd608cd5/href">https://medium.com/media/771d5f54249275b108f8624fdd608cd5/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c61490255348" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amazon Frontend SDE interview question]]></title>
            <link>https://kapilthukral.medium.com/amazon-frontend-sde-interview-question-cb93505b5b45?source=rss-f1bae610dbd4------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb93505b5b45</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Kapil Thukral]]></dc:creator>
            <pubDate>Fri, 10 Sep 2021 16:26:49 GMT</pubDate>
            <atom:updated>2022-05-20T04:58:02.421Z</atom:updated>
            <content:encoded><![CDATA[<p>Problem: define a sum function such that: sum(1,2,3)(4,10)() returns 20 and sum(1)(2)(3)() returns 6 and sum(1,2,3,4,5)(1,2,3)(1,10)() returns 32.</p><p>Note: last function call is always empty without any arguments passed in.</p><p>Approach: Keep accumulating all the arguments that are passed in and at last execute the sum function whenever we get () “function call with zero arguments”</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4465cd267f754250dd31684af1e60aba/href">https://medium.com/media/4465cd267f754250dd31684af1e60aba/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb93505b5b45" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>