---
title: "Discussion on \"Creating abstract class in Javascript\" | Hashnode"
description: "Discussion on \"Creating abstract class in Javascript\". An abstract class is a ‘class’ that is used just for inheritance. We should not be creating objects directly from abstract classes.\nHere is the code:\nfunction Car(name) {\n  if(this.constructor === Car) {\n    throw 'Cannot instantiate abstract class';..."
url: "https://hashnode.com/posts/creating-abstract-class-in-javascript-6924e72f8835/6125c5e0663d427e19ffb793"
---

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

Discussion

# [Creating abstract class in Javascript](https://blog.adarshkonchady.com/creating-abstract-class-in-javascript-6924e72f8835?utm_source=hashnode&utm_medium=feed)

An abstract class is a ‘class’ that is used just for inheritance. We should not be creating objects directly from abstract classes. Here is the code: function Car(name) { if(this.constructor === Car) { throw 'Cannot instantiate abstract class';...

Jan 12, 2016 · 1 min read · blog.adarshkonchady.com  
Read the article

## Written by

[Adarsh Konchady](https://hashnode.com/@adarshkonchady)

@adarshkonchady · Minnesota, US

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

Interested in all things Web !

As a Senior Principal Engineer at CVSHealth, I specialize in building and optimizing cvs.com to deliver a superior guest experience. Using the latest web technologies, my team and I work diligently to create a user-friendly and intuitive platform that exceeds expectations.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
