Hypercubed / javascript-the-esoteric-parts

JavaScript: The Esoteric Parts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JavaScript: The Esoteric Parts

Table of Contents

  • Introduction
  • Classical vs. Prototypal inheritance
  • Psudoclassical Inheritance
  • Object Composition
  • The ES6 class
  • Semicolons
  • Tabs vs Spaces
  • Semantic Versioning
  • Arrow function syntax
  • Observer Patterns
  • Constants and Immutability
  • Frameworks vs. Vanilla
  • Contribution Guidelines
  • License

Introduction

Classical vs. Prototypal inheritance

JavaScript uses prototypal inheritance instead of classical inheritance. Knowing the difference is key to understanding the discussions below.

Psudoclassical Inheritance (The new and this keywords)

Controversy over how to do class-like inheritance in JavaScript existed long before the ES6 class keyword.

Object Composition

The ES6 class

ES6 introduced the class keyword. ES6 classes are syntactical sugar over prototypal inheritance. There are many arguments for and against the class keyword in JavaScript.

Semicolons

JavaScript has a feature called Automatic semicolon insertion (ASI). With ASI, you are able to omit certain semicolons. Use of this feature is controversial. After the class keyword, ASI may be JavaScript's most controversial syntactic feature.

Semantic Versioning

Semantic Versioning, while not a feature of JavaScript, is vital to JavaScript package management and is often misunderstood.

Arrow function syntax

Observer Patterns

Constants and Immutability

Contribution Guidelines

Please read the following guidelines:

  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • Make an individual pull request for each suggestion.
  • Titles should be capitalized.
  • Use the following format: [Content Title](content link) and by Author Name where appropriate.
  • Choose corresponding section (and subsection) for your suggestion.
  • New sections (and subsection) are welcome.
  • Try to keep this resource objective but feel free to link to your subjective resource.
  • Try to link to primary sources instead of collections.

License

Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.

About

JavaScript: The Esoteric Parts