0% found this document useful (0 votes)
0 views

Javascript?

Uploaded by

Pushpak Rai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Javascript?

Uploaded by

Pushpak Rai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Classes

in JS

www.scribbler.live
What are Classes ?
Classes in JavaScript are blueprints for
creating objects.

They encapsulate data and functions


(known as methods) that operate on
that data.

Classes provide a clear and organized


way to define and create objects,
promoting code reusability and
scalability.
Simple Example
Imagine you want to create multiple
instances of a "Person" object, each with
properties like name and age, and
methods like introduce
Where are Classes
Applied?

1 REAL-WORLD ENTITIES

2 REUSABLE COMPONENTS

3 INHERITANCE

4 POLYMORPHISM
Inheritance
Creating a subclasses that inherit
properties and methods from a parent
class.

Inheritance depicts the parent - child


relationship.
Keep Exploring
Javascript
with us!
Share this with a friend who needs it and
make sure to practice these in scribbler.

Scribbler.live
Free and Open Interface to
experiment JavaScript

You might also like