---
title: "Discussion on \"Class, Prototype and OOP Concept Explained\" | Hashnode"
description: "Discussion on \"Class, Prototype and OOP Concept Explained\". There are 4 different ways of storing data (properties) and functionalities (methods) together in one place which can be used multiple times as need."
url: "https://hashnode.com/posts/class-prototype-and-oop-concept-explained/5fbafbc2f16aa414b7d2806f"
---

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

Discussion

# [Class, Prototype and OOP Concept Explained](https://blog.favouritejome.dev/class-prototype-and-oop-concept-explained?utm_source=hashnode&utm_medium=feed)

There are 4 different ways of storing data (properties) and functionalities (methods) together in one place which can be used multiple times as need.

Nov 23, 2020 · 10 min read · blog.favouritejome.dev  
Updated Aug 27, 2021  
Read the article

-   [#hashnodebootcamp](https://hashnode.com/tag/hashnodebootcamp)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#class](https://hashnode.com/tag/class)
-   [#oop](https://hashnode.com/tag/oop)
-   [#hashnodebootcamp2-1](https://hashnode.com/tag/hashnodebootcamp2-1)

## Written by

[Favourite Jome](https://hashnode.com/@Favourite)

@Favourite · Nigeria

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

Software Engineer @bug0

I'm Favourite Jome, a Software Engineer focused on building reliable systems, great developer tooling, and seamless user experiences.

## Responses 4

Markdown supported · ⌘↵ to post

[manjunath reddy](https://hashnode.com/@ManjunathReddy)

[Nov 24, 2020](https://hashnode.com/posts/class-prototype-and-oop-concept-explained/5fbafbc2f16aa414b7d2806f/comment/5fbd422030fc2d1b859e3b4c)

GREAT EXAMPLES..with Clear Explanation..makes it wonderful article..@JOME KEEP MAKING THIS KIND..THANKS🤑🤩

[Favourite Jome](https://hashnode.com/@Favourite)

[Nov 24, 2020](https://hashnode.com/posts/class-prototype-and-oop-concept-explained/5fbafbc2f16aa414b7d2806f/comment/5fbd422030fc2d1b859e3b4c#reply-5fbd5c3730fc2d1b859e3cab)

Thank you very much, I'll try my best 😊

[Dinys Monvoisin](https://hashnode.com/@dinmon)

[Nov 24, 2020](https://hashnode.com/posts/class-prototype-and-oop-concept-explained/5fbafbc2f16aa414b7d2806f/comment/5fbc9a05ec43af1ba6093e32)

I prefer more solution 1, function which is more straight forward and avoid dealing with stuff like prototype chain which not everybody is comfortable.

[Favourite Jome](https://hashnode.com/@Favourite)

[Nov 24, 2020](https://hashnode.com/posts/class-prototype-and-oop-concept-explained/5fbafbc2f16aa414b7d2806f/comment/5fbc9a05ec43af1ba6093e32#reply-5fbc9e9e30fc2d1b859e2d20)

If that's your preference, it fine.

But each user will have the same method returned each time the `user` function is called.

Well in this case where there's one method it's okay I guess but there're multiple methods, it will a waste of storage.

Thanks for sharing your thoughts

[Tapas Adhikary](https://hashnode.com/@atapas)

[Nov 24, 2020](https://hashnode.com/posts/class-prototype-and-oop-concept-explained/5fbafbc2f16aa414b7d2806f/comment/5fbc951430fc2d1b859e2ade)

[Jome Favourite](https://hashnode.com/@Favourite),

Great article and awesome read.

[Favourite Jome](https://hashnode.com/@Favourite)

[Nov 24, 2020](https://hashnode.com/posts/class-prototype-and-oop-concept-explained/5fbafbc2f16aa414b7d2806f/comment/5fbc951430fc2d1b859e2ade#reply-5fbc9eb130fc2d1b859e2d2b)

Thank you very much 😊

[Maxi Contieri](https://hashnode.com/@mcsee)

[Nov 23, 2020](https://hashnode.com/posts/class-prototype-and-oop-concept-explained/5fbafbc2f16aa414b7d2806f/comment/5fbbd430ec43af1ba6093399)

Loving syntactic sugar for solution 4.

Crazy JavaScript is a prototyping language and, yet, with this sugar you can get into a class language, but, under the rug, there's the equivalent model you showed here!

[Favourite Jome](https://hashnode.com/@Favourite)

[Nov 23, 2020](https://hashnode.com/posts/class-prototype-and-oop-concept-explained/5fbafbc2f16aa414b7d2806f/comment/5fbbd430ec43af1ba6093399#reply-5fbc1378ec43af1ba60938ba)

Yes, under the hood, solution 4 is interpreted as solution 3.

Thanks for reading 😊
