JS Classes

Understanding JavaScript classes and their advantages for modern web development.

After reading yet another blog post about JS classes being “just sugar for prototypal inheritance”, I’ve decided to write this post to…

This post debunks the myth that JavaScript classes are merely syntactic sugar for prototypal inheritance. It details the significant advantages modern classes bring, exploring features like strictness in constructors, built-in subclasses, and methods that are non-constructible. The author, Andrea Giammarchi, provides a detailed explanation of how modern JavaScript features improve expectations for object-oriented programming, arguing against the misconception that classes offer no new value compared to ES5 prototypal inheritance.

Use case

This article is aimed at JavaScript developers looking to deepen their understanding of class-based programming versus prototypal inheritance.

https://webreflection.medium.com/js-classes-are-not-just-syntactic-sugar-28690fedf078

JS Classes screenshot JS Classes icon
{{ ui.publicListPage.error === 'not_found' ? 'This collection is unavailable' : 'Failed to load' }}
Добавить в лист
Ваши листы

Пока нет листов — создайте новый ниже.

{{ pocketNoteSubjectLabel }}

{{ t('note.editor_hint') }}

{{ t('note.rating') }}
{{ pocketNoteStarIconName(n) }}
{{ formatPocketNoteRatingLabel(pocketNoteDraftActive.rating) }}

{{ t('action.saving') }}

Карточка листа
  • Название
  • Описание
Доступ
Публичная ссылка

{{ publicListShareUrl(user.lists[ui.list.editingListId]) }}

{{ t('home.apps') }} search

{{ t('cat.public_collections') }}
{{ pl.ownerName }} Public collection
{{ pl.name }}

{{ pl.name }}

{{ pl.ownerName }}

{{ pl.fullDescription || pl.description }}

square_arrow_up
{{ t('profile.links') }}
{{ t('home.top_categories') }}
  • {{ cat.emoji }} square_grid_2x2
    {{ cat.title }}
dAppStore
+1000 usefull apps
{{ appPageUpdatingMessage() }}