Back to Blogs

What is Object-Oriented Programming?

Object-Oriented Programming (OOP) is a programming paradigm used in many languages. Learn the basic principles and concepts.

By Maksudul Haque (Moon)
•March 12, 2026
What is Object-Oriented Programming?

Object-Oriented Programming (OOP) is a programming style that organizes code into objects.

An object contains both data (properties) and functions (methods).

Example in JavaScript:

class User {
  constructor(name) {
    this.name = name;
  }

  greet() {
    console.log("Hello " + this.name);
  }
}

const user1 = new User("John");
user1.greet();

The four main principles of OOP are:

  1. Encapsulation

  2. Inheritance

  3. Polymorphism

  4. Abstraction

OOP helps developers write cleaner, more maintainable, and reusable code.

Article Info

Published: March 12, 2026

Views: 17

Reactions: 0

Comments: 0

Use the interaction bar below to react, comment, and share this post.

Comments (0)

No comments yet. Be the first to comment!