Skip to content

This repository contains a collection of small, focused code snippets exploring constructor functions, prototype chains, method overriding, Object.setPrototypeOf, Object.create, and class inheritance in JS. Each example is self-contained with clear comments explaining the behavior and how prototypes and inheritance work.

Notifications You must be signed in to change notification settings

NonnaArzumanyan2024/prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prototype & Inheritance — JavaScript Deep Dive

This repository contains a collection of small, focused code snippets exploring constructor functions, prototype chains, method overriding, Object.setPrototypeOf, Object.create, and class inheritance in JavaScript.

Topics Covered

  • Creating objects with prototypes
  • Understanding __proto__ vs [[Prototype]]
  • Prototype inheritance with ES6 classes
  • Method overriding
  • Changing an object's prototype dynamically
  • Checking prototype relationships
  • Using Object.setPrototypeOf to modify chains

Notes

  • All examples include detailed comments and clear explanations in the code.
  • These examples are written for educational purposes.
  • Each file is independent — you can run them in any order in node.js.
  • The goal is to understand how prototypes and inheritance work in JavaScript by seeing small, isolated behaviors.

About

This repository contains a collection of small, focused code snippets exploring constructor functions, prototype chains, method overriding, Object.setPrototypeOf, Object.create, and class inheritance in JS. Each example is self-contained with clear comments explaining the behavior and how prototypes and inheritance work.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published