<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: John</title>
    <description>The latest articles on DEV Community by John (@johnc).</description>
    <link>https://dev.to/johnc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1220849%2F9dd61e62-8836-45ad-a937-05aa31eb62ac.png</url>
      <title>DEV Community: John</title>
      <link>https://dev.to/johnc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/johnc"/>
    <language>en</language>
    <item>
      <title>Day 14 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Wed, 27 Dec 2023 09:46:59 +0000</pubDate>
      <link>https://dev.to/johnc/day-14-30-days-learn-web-dev-53kd</link>
      <guid>https://dev.to/johnc/day-14-30-days-learn-web-dev-53kd</guid>
      <description>&lt;p&gt;&lt;strong&gt;21 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finished:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/group-by"&gt;2631. Group By&lt;/a&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/sort-by"&gt;2724. Sort By&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to use &lt;code&gt;Array.sort()&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 13 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Wed, 20 Dec 2023 12:30:22 +0000</pubDate>
      <link>https://dev.to/johnc/day-13-30-days-learn-web-dev-e79</link>
      <guid>https://dev.to/johnc/day-13-30-days-learn-web-dev-e79</guid>
      <description>&lt;p&gt;&lt;strong&gt;20 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finished:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/chunk-array"&gt;2677. Chunk Array&lt;/a&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/array-prototype-last"&gt;2619. Array Prototype Last&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 12 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Wed, 20 Dec 2023 12:27:11 +0000</pubDate>
      <link>https://dev.to/johnc/day-12-30-days-learn-web-dev-4m14</link>
      <guid>https://dev.to/johnc/day-12-30-days-learn-web-dev-4m14</guid>
      <description>&lt;p&gt;&lt;strong&gt;19 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finished:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/is-object-empty/"&gt;2727. Is Object Empty&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Object.keys()&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 11 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Tue, 19 Dec 2023 12:45:34 +0000</pubDate>
      <link>https://dev.to/johnc/day-11-30-days-learn-web-dev-1kg4</link>
      <guid>https://dev.to/johnc/day-11-30-days-learn-web-dev-1kg4</guid>
      <description>&lt;p&gt;&lt;strong&gt;18 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finished:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/execute-asynchronous-functions-in-parallel/"&gt;2721. Execute Asynchronous Functions in Parallel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to emulate Promise.all()&lt;/li&gt;
&lt;li&gt;For arrays, the length property returns the highest numeric index plus one.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// return 2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 10 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Thu, 14 Dec 2023 10:48:23 +0000</pubDate>
      <link>https://dev.to/johnc/day-10-30-days-learn-web-dev-4c9</link>
      <guid>https://dev.to/johnc/day-10-30-days-learn-web-dev-4c9</guid>
      <description>&lt;p&gt;&lt;strong&gt;14 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finished:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/debounce"&gt;2627. Debounce&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is Debounce in Javascript and its usage.&lt;/li&gt;
&lt;li&gt;It is guaranteed that a &lt;code&gt;timeoutID&lt;/code&gt; value will never be reused by a subsequent call to &lt;code&gt;setTimeout()&lt;/code&gt; or &lt;code&gt;setInterval()&lt;/code&gt; on the same object (a window or a worker).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fun fact: we can use &lt;code&gt;clearTimeout()&lt;/code&gt; and &lt;code&gt;clearInterval()&lt;/code&gt; interchangeably.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 9 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Wed, 13 Dec 2023 08:48:36 +0000</pubDate>
      <link>https://dev.to/johnc/day-9-30-days-learn-web-dev-kfm</link>
      <guid>https://dev.to/johnc/day-9-30-days-learn-web-dev-kfm</guid>
      <description>&lt;p&gt;&lt;strong&gt;12 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finished:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/cache-with-time-limit/description"&gt;2622. Cache With Time Limit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to implement Cache With Time Limit&lt;/li&gt;
&lt;li&gt;There is only Arrays, Set, Map has built-in support. There is no list, tree, stack, etc...&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 8 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Mon, 11 Dec 2023 09:32:52 +0000</pubDate>
      <link>https://dev.to/johnc/day-8-30-days-learn-web-dev-48j0</link>
      <guid>https://dev.to/johnc/day-8-30-days-learn-web-dev-48j0</guid>
      <description>&lt;p&gt;&lt;strong&gt;7 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finished: &lt;br&gt;
&lt;a href="https://leetcode.com/problems/interval-cancellation/"&gt;2725. Interval Cancellation&lt;/a&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/promise-time-limit/"&gt;2637. Promise Time Limit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;enhance a promise with time limit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Interval related:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;setInterval()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;ensure that execution duration is shorter than interval frequency&lt;/li&gt;
&lt;li&gt;clear interval with &lt;code&gt;clearInterval(id)&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Timeout related:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;clear timeout with &lt;code&gt;clearTimeout(id)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;recursive &lt;code&gt;setTimeout()&lt;/code&gt; pattern approach&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 7 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Wed, 06 Dec 2023 18:11:29 +0000</pubDate>
      <link>https://dev.to/johnc/day-7-30-days-learn-web-dev-2mkh</link>
      <guid>https://dev.to/johnc/day-7-30-days-learn-web-dev-2mkh</guid>
      <description>&lt;p&gt;&lt;strong&gt;6 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the function provide to &lt;code&gt;.then()&lt;/code&gt; always run asynchronously.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 6 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Tue, 05 Dec 2023 20:11:02 +0000</pubDate>
      <link>https://dev.to/johnc/day-6-30-days-learn-web-dev-14c5</link>
      <guid>https://dev.to/johnc/day-6-30-days-learn-web-dev-14c5</guid>
      <description>&lt;p&gt;&lt;strong&gt;5 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the difference of &lt;code&gt;return&lt;/code&gt;, &lt;code&gt;return await&lt;/code&gt; in async function.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 5 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Mon, 04 Dec 2023 11:28:19 +0000</pubDate>
      <link>https://dev.to/johnc/day-5-30-days-learn-web-dev-l36</link>
      <guid>https://dev.to/johnc/day-5-30-days-learn-web-dev-l36</guid>
      <description>&lt;p&gt;&lt;strong&gt;4 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finished &lt;a href="https://leetcode.com/problems/sleep/"&gt;2621. Sleep&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Promises&lt;/li&gt;
&lt;li&gt;setTimeout() return a timeoutID&lt;/li&gt;
&lt;li&gt;&lt;code&gt;clearTimeout(timeoutID)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;.finally() in promise&lt;/li&gt;
&lt;li&gt;JavaScript's Event Loop&lt;/li&gt;
&lt;li&gt;we can use promise chaining to avoid "callback hell" or "pyramid of doom"&lt;/li&gt;
&lt;li&gt;we can write asynchronous code that almost looks like synchronous code with the assistance of async and await, it is easier to understand and maintain&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 4 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Fri, 01 Dec 2023 13:42:08 +0000</pubDate>
      <link>https://dev.to/johnc/day-4-30-days-learn-web-dev-5ee8</link>
      <guid>https://dev.to/johnc/day-4-30-days-learn-web-dev-5ee8</guid>
      <description>&lt;p&gt;&lt;strong&gt;1 Dec 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finished &lt;a href="https://leetcode.com/problems/add-two-promises/"&gt;2723. Add Two Promises&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Promise.all()&lt;/li&gt;
&lt;li&gt;Promise.allSettled()&lt;/li&gt;
&lt;li&gt;promise start executing at creation.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 3 - 30 Days learn Web Dev</title>
      <dc:creator>John</dc:creator>
      <pubDate>Fri, 01 Dec 2023 06:58:47 +0000</pubDate>
      <link>https://dev.to/johnc/day-3-30-days-learn-web-dev-5f3k</link>
      <guid>https://dev.to/johnc/day-3-30-days-learn-web-dev-5f3k</guid>
      <description>&lt;p&gt;&lt;strong&gt;30 Nov 2023&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/memoize/"&gt;Finished leetcode 2623. Memoize&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learn:&lt;/strong&gt;&lt;br&gt;
We can construct custom string to be the key of the value in object/array, its very free.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
