<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Inheritance on Ghafoor's Personal Blog</title><link>https://ghafoorsblog.com/tags/inheritance/</link><description>Recent content in Inheritance on Ghafoor's Personal Blog</description><generator>Hugo</generator><language>en</language><managingEditor>hello@ghafoorsblog.com (AG Sayyed)</managingEditor><webMaster>hello@ghafoorsblog.com (AG Sayyed)</webMaster><copyright>Copyright © 2024-2026 AG Sayyed. All Rights Reserved.</copyright><lastBuildDate>Sun, 24 May 2026 09:13:13 +0100</lastBuildDate><atom:link href="https://ghafoorsblog.com/tags/inheritance/index.xml" rel="self" type="application/rss+xml"/><item><title>JavaScript Prototypes and the Prototype Chain</title><link>https://ghafoorsblog.com/posts/js/06b-objects-prototypes/</link><pubDate>Thu, 24 Jul 2025 08:00:00 +0000</pubDate><author>hello@ghafoorsblog.com (AG Sayyed)</author><guid>https://ghafoorsblog.com/posts/js/06b-objects-prototypes/</guid><description>&lt;h2 id="why-prototypes-are-still-essential-knowledge"&gt;Why prototypes are still essential knowledge&lt;/h2&gt;
&lt;p&gt;ES6 added the &lt;code&gt;class&lt;/code&gt; keyword, and many developers stopped thinking about prototypes. That is a mistake. Every JavaScript class is &lt;em&gt;syntactic sugar over prototypes&lt;/em&gt; — and the moment you debug a bug involving &lt;code&gt;instanceof&lt;/code&gt;, &lt;code&gt;Object.create&lt;/code&gt;, or a &amp;ldquo;this method exists, why is it undefined?&amp;rdquo; question, you need the underlying model.&lt;/p&gt;
&lt;p&gt;This post explains exactly how prototypes work. The &lt;a
 href="https://ghafoorsblog.com/posts/js/06c-objects-classes/"
 
 &gt;next post&lt;/a&gt; shows the &lt;code&gt;class&lt;/code&gt; syntax sitting on top.&lt;/p&gt;</description></item></channel></rss>