---
title: "Discussion on \"How does prototype delegation / inheritance work ?\" | Hashnode"
description: "Discussion on \"How does prototype delegation / inheritance work ?\". Let us look at the following code snippet:\n//constructor function\nconst Employee = function (empId, empName) {\n//instance properties\n  this.empId = empId;\n  this.empName = empName;\n};\n\nThis is a basic constructor , now what if I want to add a method ..."
url: "https://hashnode.com/posts/how-does-prototype-delegation-inheritance-work/66587a5ebdf5731ca0039215"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How does prototype delegation / inheritance work ?](https://breakthecode.hashnode.dev/how-does-prototype-delegation-inheritance-work?utm_source=hashnode&utm_medium=feed)

Let us look at the following code snippet: //constructor function const Employee = function (empId, empName) { //instance properties this.empId = empId; this.empName = empName; }; This is a basic constructor , now what if I want to add a method ...

May 30, 2024 · 2 min read · breakthecode.hashnode.dev  
Read the article

-   [#javascript-proto](https://hashnode.com/tag/javascript-proto)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#prototype-in-javacsript](https://hashnode.com/tag/prototype-in-javacsript)

## Written by

[Carolin James](https://hashnode.com/@BreakTheCode)

@BreakTheCode

  
[View profile](https://hashnode.com/@BreakTheCode)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
