JavaScript

Master JavaScript from basics to advanced

323 tutorials
12 of 323 tutorials
intermediateMar 2, 2026· 12 min read

Creating Custom Errors in JavaScript: Complete Tutorial

Learn how to create custom error classes in JavaScript. Build domain-specific errors with extra properties, organize them in hierarchies, use them for typed error handling, and integrate them with serialization and logging.

Custom ErrorsError HandlingIntermediate JavaScript+2
intermediateMar 2, 2026· 12 min read

Extending the JavaScript Error Class: Full Guide

Deep dive into extending JavaScript's Error class. Understand the inheritance pitfalls with Babel/TypeScript, fix prototype chain issues, build mixin-style errors, implement aggregate errors, and create production-ready base error classes.

JavaScriptInheritanceError Handling+2
intermediateMar 2, 2026· 14 min read

The JavaScript Prototype Chain: Complete Guide

Master the JavaScript prototype chain from the ground up. Learn how property lookup works, how objects link via [[Prototype]], inheritance patterns using Object.create and classes, and how the chain affects performance.

PrototypesIntermediate JavaScriptOOP+2
intermediateMar 2, 2026· 11 min read

JavaScript __proto__ vs prototype: What Is the Difference?

Understand the fundamental difference between __proto__ and prototype in JavaScript. Learn what each one is, when each exists, how they connect via the new operator, and why mixing them up causes subtle bugs.

OOPJavaScriptPrototypes+2
intermediateMar 2, 2026· 13 min read

How Prototypal Inheritance Works in JavaScript

Understand prototypal inheritance in JavaScript: how objects inherit from other objects, the difference from classical inheritance, delegation patterns, Object.create, and how class syntax maps to prototypes under the hood.

Intermediate JavaScriptJavaScriptPrototypes+2
intermediateMar 2, 2026· 11 min read

Modifying the JavaScript Object Prototype: Guide

Learn when and how to safely modify JavaScript's Object prototype. Understand why modifying native prototypes is dangerous, the safe alternatives, polyfill patterns, and how to extend prototypes in controlled library code.

Best PracticesPrototypesIntermediate JavaScript+2
intermediateMar 2, 2026· 12 min read

JS Constructor Functions: A Complete Tutorial

Master JavaScript constructor functions — the original OOP pattern before classes. Learn how the new operator works, prototype-based method sharing, the constructor property, instanceof checks, and the relationship to modern class syntax.

JavaScriptConstructor FunctionsOOP+2
intermediateMar 2, 2026· 13 min read

JavaScript Classes Explained: Complete Tutorial

A complete guide to JavaScript ES6 classes. Covers class declarations and expressions, constructors, instance methods, static methods, getters/setters, class fields, hoisting behavior, and how classes map to the underlying prototype system.

JavaScriptOOPClasses+2
intermediateMar 2, 2026· 13 min read

JavaScript Class Inheritance: Complete Tutorial

A complete guide to JavaScript class inheritance using extends and super. Learn how to create class hierarchies, call parent constructors, override methods, use super.method(), and understand instanceof with multi-level inheritance.

Class InheritanceJavaScriptIntermediate JavaScript+3
intermediateMar 2, 2026· 11 min read

Using the super Keyword in JavaScript Classes

A complete guide to the super keyword in JavaScript. Learn how super() works in constructors, how super.method() calls parent implementations, super in static methods, super in object literals, and common mistakes every developer should avoid.

Classessuper keywordIntermediate JavaScript+3
intermediateMar 2, 2026· 11 min read

JavaScript Static Methods: A Complete Tutorial

Complete guide to static methods and properties in JavaScript classes. Learn how the static keyword works, instance vs static access, static factory methods, static class fields, inherited statics, and static initialization blocks.

Intermediate JavaScriptClassesOOP+2
intermediateMar 2, 2026· 12 min read

Encapsulation in JavaScript: Complete Tutorial

A complete guide to encapsulation in JavaScript. Learn convention-based encapsulation with underscore prefixes, WeakMap-based private state, Symbol-based hiding, ES2022 private class fields, getters and setters for controlled access, and when each approach makes sense.

EncapsulationIntermediate JavaScriptOOP+1