<?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: yk-david</title>
    <description>The latest articles on DEV Community by yk-david (@yk-david).</description>
    <link>https://dev.to/yk-david</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1027719%2F95fcd35b-e9d5-4250-a957-6192f922d1d6.png</url>
      <title>DEV Community: yk-david</title>
      <link>https://dev.to/yk-david</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yk-david"/>
    <language>en</language>
    <item>
      <title>What if Array is Object like thing after all?</title>
      <dc:creator>yk-david</dc:creator>
      <pubDate>Wed, 01 May 2024 14:01:24 +0000</pubDate>
      <link>https://dev.to/yk-david/what-if-array-is-object-like-thing-after-all-f9m</link>
      <guid>https://dev.to/yk-david/what-if-array-is-object-like-thing-after-all-f9m</guid>
      <description>&lt;p&gt;Both Array and Object are a JavaScript data structure. While Array stores data with sequential index number, Object attaches values to key. &lt;/p&gt;

&lt;p&gt;But couldn't we consider that index of Array is a hidden equivalent to Object's key? (of type number)&lt;/p&gt;

&lt;p&gt;Let me develop:&lt;/p&gt;

&lt;p&gt;// array&lt;br&gt;
&lt;code&gt;fruits = ['apple', 'banana', 'cherry'];&lt;/code&gt; &lt;br&gt;
&lt;code&gt;console.log(fruits[0]);&lt;/code&gt; // 'apple' 🤔 &lt;/p&gt;

&lt;p&gt;// object&lt;br&gt;
&lt;code&gt;fruits = {0: 'apple', 1: 'banana', 2: 'cherry'};&lt;/code&gt;&lt;br&gt;
&lt;code&gt;console.log(fruits[0]);&lt;/code&gt; // 'apple' 😮 &lt;/p&gt;

&lt;p&gt;Hm... Could Array potentially be build on Object?&lt;/p&gt;

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