<?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: Cecilia Olivera</title>
    <description>The latest articles on DEV Community by Cecilia Olivera (@cec1_c0d).</description>
    <link>https://dev.to/cec1_c0d</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%2F264034%2Fea3894bf-4fb4-4d95-95ed-ee46d88a183d.jpg</url>
      <title>DEV Community: Cecilia Olivera</title>
      <link>https://dev.to/cec1_c0d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cec1_c0d"/>
    <language>en</language>
    <item>
      <title>Your Accessibility Overlay Is a Scam (And Here's the Proof)</title>
      <dc:creator>Cecilia Olivera</dc:creator>
      <pubDate>Sun, 25 Jan 2026 18:46:44 +0000</pubDate>
      <link>https://dev.to/cec1_c0d/your-accessibility-overlay-is-a-scam-and-heres-the-proof-5g76</link>
      <guid>https://dev.to/cec1_c0d/your-accessibility-overlay-is-a-scam-and-heres-the-proof-5g76</guid>
      <description>&lt;p&gt;You've probably seen them: that little wheelchair icon floating in the corner of websites, promising "accessibility" with one click. Maybe your company even pays for one. Products like accessiBe, UserWay, EqualWeb, and AudioEye promise to make your website accessible and legally compliant by just adding a single line of JavaScript.&lt;/p&gt;

&lt;p&gt;It sounds too good to be true. &lt;strong&gt;Because it is.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let me be clear from the start: I'm not being hyperbolic when I say "scam." In January 2025, the &lt;a href="https://www.ftc.gov/legal-library/browse/cases-proceedings/2223156-accessibe-inc" rel="noopener noreferrer"&gt;Federal Trade Commission fined accessiBe $1 million&lt;/a&gt; for deceptive marketing claims. The FTC determined that accessiBe was falsely claiming their product made websites "WCAG compliant" when it simply couldn't deliver on that promise.&lt;/p&gt;

&lt;p&gt;And accessiBe isn't an outlier—it's the industry leader. The others make the same claims.&lt;/p&gt;

&lt;h2&gt;
  
  
  What accessibility overlays actually are
&lt;/h2&gt;

&lt;p&gt;An accessibility overlay is a JavaScript widget that sits on top of your website. When users click on it, they get a panel with options like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change colors/contrast&lt;/li&gt;
&lt;li&gt;Increase font size&lt;/li&gt;
&lt;li&gt;Enable a "screen reader"&lt;/li&gt;
&lt;li&gt;Activate "profiles" for blindness, dyslexia, ADHD, etc.&lt;/li&gt;
&lt;li&gt;A magical toggle to "make the site WCAG compliant"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flakaw75hatgszr4kt2fa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flakaw75hatgszr4kt2fa.png" alt="View of an open accessibility overlay showing its features" width="524" height="897"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The pitch to businesses is irresistible: instead of spending money on actual accessibility work, just pay us $500-2000/year and we'll handle everything. Avoid lawsuits! Be compliant! One line of code!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why they can't work (technically)
&lt;/h2&gt;

&lt;p&gt;Here's the thing: &lt;strong&gt;web accessibility isn't about surface-level appearance&lt;/strong&gt;. It's about the underlying structure of your HTML.&lt;/p&gt;

&lt;p&gt;WCAG (Web Content Accessibility Guidelines) is the international standard that accessibility laws reference. It has specific technical requirements like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Semantic HTML structure&lt;/strong&gt;: headings (&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;), lists, landmarks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Properly labeled form fields&lt;/strong&gt;: &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; elements correctly associated with inputs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keyboard navigation&lt;/strong&gt;: logical tab order, focus management&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ARIA attributes&lt;/strong&gt;: proper roles, states, and properties for dynamic content&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text alternatives&lt;/strong&gt;: meaningful alt text for images (not auto-generated garbage)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An overlay is JavaScript that runs &lt;em&gt;on top of&lt;/em&gt; your existing code. &lt;strong&gt;It cannot change your source code.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;If your HTML uses &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; where it should use &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;, the overlay can't fix that. If your form fields don't have proper labels, the overlay can't create that association. If your modal doesn't trap focus correctly, the overlay can't restructure your DOM.&lt;/p&gt;

&lt;p&gt;It's like putting a cardboard on a staircase and calling it a wheelchair ramp.&lt;/p&gt;

&lt;h2&gt;
  
  
  The features are either fake, redundant, or irrelevant
&lt;/h2&gt;

&lt;p&gt;Let's break down what these overlays actually offer:&lt;/p&gt;

&lt;h3&gt;
  
  
  Fake: "Make site WCAG compliant" toggle
&lt;/h3&gt;

&lt;p&gt;EqualWeb literally has an ON/OFF switch labeled "Make the site comply with WCAG."&lt;/p&gt;

&lt;p&gt;This is the exact claim the FTC sanctioned. WCAG 2.1 has &lt;strong&gt;78 success criteria&lt;/strong&gt;. Many require structural changes to your codebase. No JavaScript widget can magically fix all of them with a toggle. This feature is, to put it plainly, a lie.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fake: "Blindness profile"
&lt;/h3&gt;

&lt;p&gt;Blind users already have screen readers. Professional ones. JAWS, NVDA (free), VoiceOver (built into Apple devices), TalkBack (Android). They've spent years learning these tools and configuring them to their needs.&lt;/p&gt;

&lt;p&gt;An overlay that "adapts the site for blindness" can actually &lt;em&gt;interfere&lt;/em&gt; with their existing screen reader, change keyboard shortcuts they rely on, and create an inconsistent experience across websites.&lt;/p&gt;

&lt;p&gt;Moreover, I've checked that some of these overlay screenreaders ignore aria-hidden, the standard for removing a node from the accessibility tree (AOM), which is the data structure that dependable screen readers use to know what they are allowed to read.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fake: "AI-powered image descriptions"
&lt;/h3&gt;

&lt;p&gt;Overlays claim to automatically generate alt text for images using AI. The problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The descriptions are generic ("a person smiling") instead of contextual ("CEO presenting Q3 results")&lt;/li&gt;
&lt;li&gt;Decorative images should have &lt;code&gt;alt=""&lt;/code&gt; (empty), but AI adds unnecessary descriptions&lt;/li&gt;
&lt;li&gt;WCAG requires alt text to be &lt;em&gt;functionally equivalent&lt;/em&gt;, which requires human judgment about purpose&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Redundant: Everything else
&lt;/h3&gt;

&lt;p&gt;Most overlay features already exist at the operating system level:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Overlay feature&lt;/th&gt;
&lt;th&gt;Already exists in...&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Zoom/Magnification&lt;/td&gt;
&lt;td&gt;Windows Magnifier, macOS Zoom, browser Ctrl+/-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;High contrast&lt;/td&gt;
&lt;td&gt;Windows High Contrast, macOS Increase Contrast&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Color filters (colorblindness)&lt;/td&gt;
&lt;td&gt;Windows, macOS, iOS, Android color filters&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Screen reader&lt;/td&gt;
&lt;td&gt;NVDA (free), VoiceOver (free), TalkBack (free), Narrator (free)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large cursor&lt;/td&gt;
&lt;td&gt;System accessibility settings on all OS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Voice control&lt;/td&gt;
&lt;td&gt;Dragon, Windows Voice Control, macOS Voice Control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Text-to-speech&lt;/td&gt;
&lt;td&gt;Built into every modern OS and browser&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;On-screen keyboard&lt;/td&gt;
&lt;td&gt;Built into every OS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dictionary&lt;/td&gt;
&lt;td&gt;Built into every OS (Ctrl+Cmd+D on Mac, right-click on Windows)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;People who need these features &lt;strong&gt;already have them configured system-wide&lt;/strong&gt;, working across all apps and websites. They don't need each website to provide its own inferior version. Also, none of them are WCAG requirements and therefore, not a web dev responsibility.&lt;/p&gt;

&lt;h3&gt;
  
  
  Irrelevant: "Profiles" for ADHD, Dyslexia, Epilepsy, etc.
&lt;/h3&gt;

&lt;p&gt;WCAG doesn't have success criteria for "ADHD profile" or "dyslexia mode." These aren't legal requirements. &lt;/p&gt;

&lt;p&gt;What WCAG &lt;em&gt;does&lt;/em&gt; require is specific things like not having content that flashes more than 3 times per second (for seizure safety), proper text spacing, ability to pause moving content, etc. An overlay can't stop a video from flashing. An overlay can't fix your auto-playing carousel.&lt;/p&gt;

&lt;p&gt;These "profiles" are marketing theater — they sound inclusive but don't address actual legal compliance.&lt;/p&gt;

&lt;h2&gt;
  
  
  They don't protect you from lawsuits
&lt;/h2&gt;

&lt;p&gt;The whole pitch is "avoid lawsuits." But the data shows the opposite:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;25% of accessibility lawsuits in 2024 were against websites with overlays installed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The legal precedent is clear. In the &lt;em&gt;Murphy v. Eyebobs&lt;/em&gt; case, the court explicitly rejected the argument that an overlay provided adequate accessibility. In the &lt;em&gt;LightHouse v. ADP&lt;/em&gt; settlement, the agreement explicitly stated that "overlay solutions such as those provided by AudioEye and accessiBe &lt;strong&gt;will not be sufficient&lt;/strong&gt; to achieve accessibility."&lt;/p&gt;

&lt;p&gt;Plaintiff attorneys &lt;em&gt;know&lt;/em&gt; about overlays. Finding an overlay on a website doesn't make them go away—it shows them you tried to take a shortcut instead of doing the actual work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Over 1000 accessibility professionals have signed against them
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://overlayfactsheet.com" rel="noopener noreferrer"&gt;Overlay Fact Sheet&lt;/a&gt; is a public document signed by more than 1000 accessibility professionals worldwide, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contributors to WCAG, ARIA, and HTML standards&lt;/li&gt;
&lt;li&gt;Employees at Google, Microsoft, Apple, BBC&lt;/li&gt;
&lt;li&gt;Independent accessibility consultants&lt;/li&gt;
&lt;li&gt;Disability advocates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The statement is clear: overlays don't work, they often make things worse, and they represent a misallocation of resources that should go toward real accessibility.&lt;/p&gt;

&lt;p&gt;accessiBe, UserWay, EqualWeb, and AudioEye are all explicitly named.&lt;/p&gt;

&lt;h2&gt;
  
  
  The European Disability Forum has warned against them
&lt;/h2&gt;

&lt;p&gt;In May 2023, the &lt;a href="https://www.edf-feph.org/accessibility-overlays-dont-guarantee-compliance-with-european-legislation/" rel="noopener noreferrer"&gt;European Disability Forum (EDF) and the International Association of Accessibility Professionals (IAAP) issued a joint statement&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Overlays &lt;strong&gt;do not make the website accessible or compliant with European accessibility legislation&lt;/strong&gt;. They do not constitute an acceptable alternative or a substitute for fixing the website itself."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is particularly relevant now that the European Accessibility Act (EAA) is in effect as of June 2025.&lt;/p&gt;

&lt;h2&gt;
  
  
  They also introduce security risks
&lt;/h2&gt;

&lt;p&gt;In November 2022, &lt;a href="https://www.imperva.com/blog/vulnerability-discovered-in-equalweb-accessibility-widget/" rel="noopener noreferrer"&gt;Imperva's security research team discovered a DOM XSS vulnerability&lt;/a&gt; in EqualWeb's widget. The vulnerability affected major clients including Fiverr, Bosch, Playtika, and Avis.&lt;/p&gt;

&lt;p&gt;When you add a third-party JavaScript widget to your site, you're trusting that vendor with your users' security. These overlays load external scripts on every page load, expanding your attack surface.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you should do instead
&lt;/h2&gt;

&lt;p&gt;If you actually care about accessibility (and avoiding lawsuits):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Remove the overlay.&lt;/strong&gt; It's not helping. It might be hurting.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Get an audit.&lt;/strong&gt; Hire an accessibility professional to evaluate your site against WCAG 2.1 AA.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fix the actual issues.&lt;/strong&gt; Work with your development team to address problems in the source code. This means semantic HTML, proper ARIA, keyboard navigation, color contrast, alt text, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Train your team.&lt;/strong&gt; Designers, developers, and content creators should understand accessibility basics so new features don't introduce new barriers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test with real users.&lt;/strong&gt; Include people with disabilities in your QA process. They'll find issues automated tools miss.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Yes, this costs more than a few bucks a month. But it actually works. And it won't get you sued.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bottom line
&lt;/h2&gt;

&lt;p&gt;Accessibility overlays are selling you a lie: that you can buy compliance without doing the work. The FTC has called it deceptive. The disability community has rejected it. The data shows they don't prevent lawsuits.&lt;/p&gt;

&lt;p&gt;If your company uses one, share this article with your manager. If you're a developer being asked to implement one, push back with this evidence. If you're evaluating accessibility solutions, run away from anyone promising a one-line JavaScript fix.&lt;/p&gt;

&lt;p&gt;Real accessibility requires real work. There are no shortcuts.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Further reading:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://overlayfactsheet.com" rel="noopener noreferrer"&gt;Overlay Fact Sheet&lt;/a&gt; — The public statement signed by 1000+ professionals&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://overlayfalseclaims.com" rel="noopener noreferrer"&gt;Overlay False Claims&lt;/a&gt; — Documented evidence of misleading marketing&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.ftc.gov/legal-library/browse/cases-proceedings/2223156-accessibe-inc" rel="noopener noreferrer"&gt;FTC v. accessiBe&lt;/a&gt; — The $1M fine for deceptive practices&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.edf-feph.org/accessibility-overlays-dont-guarantee-compliance-with-european-legislation/" rel="noopener noreferrer"&gt;EDF/IAAP Joint Statement&lt;/a&gt; — European Disability Forum warning&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://adrianroselli.com" rel="noopener noreferrer"&gt;Adrian Roselli's blog&lt;/a&gt; — Extensive documentation of overlay problems&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.w3.org/WAI/WCAG21/quickref/" rel="noopener noreferrer"&gt;WCAG 2.1 Quick Reference&lt;/a&gt; — What actual compliance looks like&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>a11y</category>
      <category>automation</category>
    </item>
    <item>
      <title>¿Qué significa que Javascript está basado en prototipos?</title>
      <dc:creator>Cecilia Olivera</dc:creator>
      <pubDate>Sat, 12 Sep 2020 09:21:05 +0000</pubDate>
      <link>https://dev.to/cec1_c0d/que-significa-que-javascript-esta-basado-en-prototipos-1g0a</link>
      <guid>https://dev.to/cec1_c0d/que-significa-que-javascript-esta-basado-en-prototipos-1g0a</guid>
      <description>&lt;p&gt;Cuando empecé a estudiar Javascript y POO escuché muchas veces que &lt;strong&gt;a pesar de que Javascript es un lenguaje orientado a objetos no está basado en clases sino en prototipos.&lt;/strong&gt;&lt;br&gt;
En este artículo intentaremos entender qué significa exactamente esto y por qué es importante saber qué hace un prototipo.&lt;/p&gt;

&lt;p&gt;En otros lenguajes orientados a objetos &lt;strong&gt;cuando declaramos una clase estamos creando un nuevo tipo de dato compuesto&lt;/strong&gt;, es decir, un tipo de dato formado por tipos primitivos. Pero esto no es lo que ocurre en Javascript, a pesar de que desde ES2015 usemos la palabra reservada class. &lt;strong&gt;Los prototipos son instancias de objetos.&lt;/strong&gt; Mientras que las clases son modelos, &lt;strong&gt;los objetos heredan directamente de otros objetos por defecto en JS.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Entonces, primero que nada tenemos que entender &lt;strong&gt;qué es la cadena de prototipos.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;La cadena de prototipos es una &lt;strong&gt;estructura en forma de árbol que conecta funcionalidades entre objetos y en cuya raíz se encuentra Object.prototype.&lt;/strong&gt; Object.prototype provee de una serie de métodos que aparecen en todos los objetos, como por ejemplo toString( ), hasOwnProperty( ) o keys( ).&lt;/p&gt;

&lt;p&gt;Prácticamente todos los objetos en Javascript son instancias de Object si seguimos la cadena de prototipos. Y como probablemente ya sabes, casi todo es un objeto en Javascript. &lt;a href="https://javascriptweblog.wordpress.com/2010/09/27/the-secret-life-of-javascript-primitives/" rel="noopener noreferrer"&gt;Incluso algunos tipos de datos primitivos (string, number y boolean específicamente) pueden ser objetos por fracciones muy pequeñas de tiempo.&lt;/a&gt; Entonces, los arrays son objetos, las funciones son objetos y, por supuesto, los objetos son objetos.&lt;/p&gt;

&lt;p&gt;La cadena prototipal nos permite crear instancias de arrays, por ejemplo, que tengan acceso a todos los métodos definidos en Array.prototype como map, forEach, filter y un gran etc. Pero también obtenemos acceso a todos los métodos disponibles en Object.prototype. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pero, ¿cómo ocurre esto?&lt;/strong&gt;&lt;br&gt;
Pues resulta que todos los objetos en Javascript tienen una propiedad oculta llamada  __proto__  que guarda una referencia al objeto prototype del constructor.  Siguiendo con el ejemplo de los arrays, un array tiene acceso a todos los métodos en Object.prototype porque cada array individual es una instancia del objeto Array, y el objeto Array es una instancia del objeto Object. &lt;strong&gt;Y esta cadena continúa hasta que llegamos al prototipo de Object.prototype, que será &lt;em&gt;null&lt;/em&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnz67v6h1vyqxzsoxwxty.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnz67v6h1vyqxzsoxwxty.png" alt="Alt Text" width="800" height="864"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;De esta manera, cuando intentamos ejecutar un método en un objeto, Javascript primero buscará en las propiedades del objeto en cuestión. Si no encuentra una propiedad con ese nombre buscará en su propiedad __proto__, que guarda una referencia al objeto prototype de su constructor. Si no la encuentra ahí buscará en la propiedad __proto__ del objeto constructor. Esto continuará hasta que encuentre esa propiedad o método, o no la encuentre y lance un TypeError.&lt;/p&gt;

&lt;p&gt;Por si acaso, ya que estamos usando los arrays como ejemplo, cabe recordar que los arrays son azúcar sintáctico en Javascript. Son objetos con un comportamiento especial, pero bajo la alfombra son algo así:&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    ‘0’: value,
    ‘1’: value,
    ‘2’: value
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Lo que esto significa es que, por ejemplo, cada vez que declaramos un array estamos creando una instancia del objeto Array que viene con el lenguaje. Si lo miramos en consola veremos que la propiedad __proto__ está vinculada al objeto Array:&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu1wqdxtu34d9yo4yn841.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu1wqdxtu34d9yo4yn841.png" alt="Alt Text" width="417" height="108"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Y si seguimos metiéndonos en la madriguera veremos que el objeto __proto__ tiene también una propiedad __proto__ que guarda una referencia a Object.prototype (es una referencia aunque nos salga en consola todo, porque ya sabes, DRY).&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcm6voi7dqkr5c211wlge.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcm6voi7dqkr5c211wlge.png" alt="Alt Text" width="800" height="1131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Entonces, ¿hay alguna forma de crear un objeto sin prototipo en Javascript? &lt;br&gt;
Pues sí, la hay. Resulta que una de las formas que tenemos de crear objetos es con Object.create( ), a la cual podemos pasarle como argumento el objeto que queremos que sea el prototipo del nuevo objeto que queremos crear. Si le pasamos null estaremos creando un objeto que sea solo eso, una hash table:&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const objetoSinPrototipo = Object.create(null);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>oop</category>
      <category>prototipos</category>
    </item>
    <item>
      <title>What does it mean that Javascript is prototype based?</title>
      <dc:creator>Cecilia Olivera</dc:creator>
      <pubDate>Fri, 11 Sep 2020 19:10:01 +0000</pubDate>
      <link>https://dev.to/cec1_c0d/what-does-it-mean-that-javascript-is-prototype-based-30jf</link>
      <guid>https://dev.to/cec1_c0d/what-does-it-mean-that-javascript-is-prototype-based-30jf</guid>
      <description>&lt;p&gt;When I first started learning Javascript and OOP I heard over and over that Javascript is an object-oriented language though it is &lt;strong&gt;not based on classes but prototypes.&lt;/strong&gt; &lt;br&gt;
In this article we are going to try to understand what this means and why it is important to know what a prototype is to acknowledge what we are doing. &lt;/p&gt;

&lt;p&gt;In other object-oriented languages &lt;strong&gt;when you declare a class you are creating a new complex data type&lt;/strong&gt;, that is to say, a data type composed of primitive data types. But this is not what happens in Javascript even though we use the keyword class since ES2015. &lt;strong&gt;Prototypes are object instances.&lt;/strong&gt; While a class is a blueprint, &lt;strong&gt;objects inherit directly from other objects by default in Javascript.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To understand what this means, we need to understand what the prototype chain is.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The prototype chain is a &lt;strong&gt;tree-shaped structure that connects objects functionality and at the root of this tree is where Object.prototype lays.&lt;/strong&gt;&lt;br&gt;
Object.prototype provides a few methods that show up in all objects, such as toString( ), hasOwnProperty( ) or keys( ). &lt;/p&gt;

&lt;p&gt;Almost every object in Javascript is an instance of Object if we follow the prototype chain. And as you probably know, almost everything in Javascript is an object, &lt;a href="https://bit.ly/33m22RS" rel="noopener noreferrer"&gt;even some primitive data types (string, boolean and number specifically) can be objects for a tiny fraction of time.&lt;/a&gt; So, arrays are objects, functions are objects and, of course, objects are objects. &lt;/p&gt;

&lt;p&gt;The prototype chain allows us to create instances of, for example, arrays that have access to all the methods that are available for arrays, like map, forEach, reduce, filter, and a big etc. But arrays also have access to all the Object.prototype functionalities.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does this happen?&lt;/strong&gt;&lt;br&gt;
Just to be clear because we are using arrays for the example, arrays are syntactic sugar in Javascript. They are objects with a special behavior to make them look and feel like an array, but under the hood, they are something like this:&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  '0': value,
  '1': value,
  '2': value
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt; &lt;/p&gt;

&lt;p&gt;It turns out that every object has a property called __proto__ which holds a reference to the prototype object of the constructor. So following the array example, an array has access to all the methods in Object.prototype because every array is an instance of the Array object and the Array object is an instance of the Object object. &lt;strong&gt;And this chain goes on until we hit the prototype of Object.prototype which will be &lt;em&gt;null&lt;/em&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This way, when we try to execute a method on an object, first JS will lookup in the properties of the object itself. If it doesn’t find a property with that name, it will look in its __proto__ property, which holds a reference to the prototype object of its constructor. If it doesn’t find it there it will look in the __proto__ property of the constructor object. This will go on until it finds it or it doesn’t find it and throws a TypeError.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;What this means is that, for example, &lt;strong&gt;every time we declare an array we are creating an instance of the Array object that comes with the language.&lt;/strong&gt; if we look at it in the console we will see that its __proto__ property is linked to the Array object:&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F43xhyrw2uk18v8ejzzj3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F43xhyrw2uk18v8ejzzj3.png" alt="Alt Text" width="800" height="864"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;And if we keep looking down the rabbit hole we’ll see that &lt;strong&gt;the __proto__ object has a __proto__ property itself that holds a reference to Object.prototype&lt;/strong&gt; (it’s a reference even though you see all the properties in the console because you know, DRY).&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyn7o38lw8grnzfges8cs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyn7o38lw8grnzfges8cs.png" alt="Alt Text" width="800" height="1131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, is there a way to create an object without a prototype in Javascript?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Well, yes there is. One of the ways of creating an object is with Object.create( ), to which we can pass as an argument the prototype we want that object to have, which by default is Object.prototype. If we pass it null as an argument we will get an object that is just that, a hash table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const objectWithoutPrototype = Object.create(null);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Share if you liked it and let's connect! Follow me on &lt;a href="https://twitter.com/cec1_c0d" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/cecilia-olivera-webdev/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; 😊&lt;/p&gt;

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