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.

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 }}

Выделите текст — над ним появится панель форматирования.

Оценка
{{ pocketNoteStarIconName(n) }}
{{ formatPocketNoteRatingLabel(pocketNoteDraftActive.rating) }}

Сохраняем…

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

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

Games

What We're Playing NowSee All
Popular GamesSee All
New Games We LoveSee All
Top Free GamesSee All
Top CategoriesSee All
Editors' ChoiceSee All
Quick LinksSee All

Apps search

Public collections
{{ pl.ownerName }} Public collection
{{ pl.name }}

{{ pl.name }}

{{ pl.ownerName }}

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

square_arrow_up
Top Categories
  • {{ cat.emoji }} square_grid_2x2
    {{ cat.title }}
Quick Links
dAppStore
+1000 usefull apps

Profile

  • {{apps[id].title}}
    {{apps[id].subtitle}}
    ★ {{ user.installed[id].rating }}/10 {{ user.installed[id].notePublic ? '🌐 ' : '🔒 ' }}{{ user.installed[id].note }} {{ user.installed[id].description }}
  • {{ item.meta.visibility === 'public' ? 'globe' : 'lock_fill' }}
    {{ item.meta.name }}
    {{ item.meta.description }}
    Public
  • No lists yet. Create one below.
  • Nothing matches your search.
  • plus
    New list
  • link
    {{entry[1].title}}
    {{entry[1].url}}
    ★ {{ entry[1].rating }}/10 {{ entry[1].notePublic ? '🌐 ' : '🔒 ' }}{{ entry[1].note }} {{ entry[1].description }}

Новый лист

{{ appPageStarRatingTitle(appPageStarRating()) }}
{{ appPageStarRatingValue(appPageStarRating()) }}
{{ getStarIconName(appPageStarRatingFive(appPageStarRating()), n) }}
TMDB
{{ numeral(page.app.tmdb.voteAverage).format('0.0') }}
/ 10
Статус
Закрыто {{ formatAppClosedDate(page.app.closedAt || (page.app.rip && page.app.rip.at)) }}
Age
{{page.app.age_rating}}
Years Old
Developer
person_crop_square
{{page.app.developer && page.app.developer.name ? page.app.developer.name : page.app.title }}
Language
{{page.app.lang[0]}}
+{{page.app.lang.length}} More
main
Size
{{formatBytes(page.app.size, 'number')}}
{{formatBytes(page.app.size, 'unit')}}
Screenshot
Use case
Загружаем описание и детали…
Описание появится через несколько секунд…
Сезоны и серии
  • {{ mediaSeasonLabel(season) }}
    {{ seasonRatingDisplay(season.seasonNumber).label }} {{ season.episodeCount }} серий

    Список серий пока недоступен.

    • S{{ season.seasonNumber }}E{{ ep.episodeNumber }} {{ ep.name || ('Серия ' + ep.episodeNumber) }}
      {{ ep.overview }}
      {{ episodeRatingDisplay(season.seasonNumber, ep.episodeNumber).label }}
What's New

Version {{update.version}} {{update.date ? moment(update.date).format('LL') : ''}}

Ratings & Reviews
Information
  • Age Rating
    {{page.app.age_rating}}
  • Released
    {{ page.app.omdb.released }}
  • {{ r.label }}
    {{ r.displayValue }}
  • Runtime
    {{ page.app.omdb.runtime }}
  • Director
    {{ page.app.omdb.director }}
  • Writer
    {{ page.app.omdb.writer }}
  • Cast
    {{ page.app.omdb.actors }}
  • Genre
    {{ page.app.omdb.genre.join(', ') }}
  • Country
    {{ page.app.omdb.country.join(', ') }}
  • Awards
    {{ page.app.omdb.awards }}
  • Box Office
    {{ page.app.omdb.boxOffice }}
  • In-App Purchases
    {{page.app.IAP == true ? 'Yes' : 'No'}}
  • Copyright
    {{page.app.copyright}}
  • Created
    {{moment(page.app.created).format('ll')}}
  • Tranco rank
    {{numeral(page.app.rank.tranco).format(',')}}