📲 Download Utility Tools Apps

EMI Calculator

Download EMI Calculator

SOA Games

Download SOA Games

SOA Technology App

Download SOA Technology

BMI Checker

Download BMI Checker

Task Jira

Download Task Jira

Laughing Adda

Download Laughing Adda

📅 हिंदी कैलेंडर ऐप डाउनलोड करें

Download Shubhcalendar App

JavaScript OOP Interview Questions from basic to advanced

🟢 Basic Level Questions

1. What is OOP in JavaScript?

👉 A programming paradigm based on objects and classes to structure code.


2. What is a class in JavaScript?

👉 A blueprint to create objects using properties and methods.


3. What is an object?

👉 An instance of a class that contains data (properties) and behavior (methods).


4. What is a constructor?

👉 A special method used to initialize object values when created.


5. What is this keyword?

👉 Refers to the current object.


6. Difference between class and object?

👉 Class = blueprint
👉 Object = real instance


🟡 Intermediate Level Questions

7. What is inheritance?

👉 Mechanism to reuse code from another class using extends.


8. What is encapsulation?

👉 Wrapping data and methods together and restricting direct access.


9. What are private fields in JS?

👉 Variables declared using # and cannot be accessed outside the class.


10. What is polymorphism?

👉 Same method behaves differently in different classes.


11. What is method overriding?

👉 Redefining a parent class method in a child class.

class Animal {
speak() {
console.log("Animal sound");
}
}class Dog extends Animal {
speak() {
console.log("Dog barks");
}
}

12. What is the difference between function constructor and class?

👉 Both create objects, but:

  • Class = modern, cleaner syntax
  • Function constructor = older way

13. What is prototype in JavaScript?

👉 Mechanism by which objects inherit features from another object.


14. What is prototype chain?

👉 Chain of objects used to resolve properties.


15. Difference between __proto__ and prototype?

👉 prototype → property of constructor
👉 __proto__ → reference of object


🔴 Advanced Level Questions

16. What is static method?

👉 Method belongs to class, not object.

class MathUtil {
static add(a, b) {
return a + b;
}
}MathUtil.add(2, 3);

17. What is abstraction?

👉 Hiding implementation details and showing only essential features.


18. Can JavaScript support multiple inheritance?

👉 ❌ No (directly)
👉 ✅ Can be done using mixins


19. What are getters and setters?

👉 Methods to get/set values safely.

class Person {
constructor(name) {
this._name = name;
} get name() {
return this._name;
} set name(value) {
this._name = value;
}
}

20. What is method chaining?

👉 Calling multiple methods in one line.

obj.method1().method2().method3();

21. What is super keyword?

👉 Used to call parent class constructor/method.


22. Difference between shallow copy and deep copy?

👉 Shallow → reference copy
👉 Deep → full independent copy


23. How does JavaScript implement OOP internally?

👉 Using prototype-based inheritance


24. What is mixin?

👉 Technique to add reusable functionality to classes.


25. What are ES6 classes syntactic sugar for?

👉 Prototype-based inheritance


🔥 Bonus Practical Question

26. Create a class with inheritance example

👉 Very common in interviews:

class Vehicle {
constructor(name) {
this.name = name;
} start() {
console.log(this.name + " starting...");
}
}class Car extends Vehicle {
drive() {
console.log(this.name + " driving...");
}
}const c = new Car("BMW");
c.start();
c.drive();

💡 Pro Tip (For Interviews)

Interviewers often check:

  • Clear concept understanding
  • Real-life examples
  • Ability to write small code


AI Spiritual Tools & Interactive Experiences

Explore powerful AI-driven tools for daily guidance, spirituality, fun quizzes, and self-discovery.

Today’s Quote

Get inspiring daily quotes powered by AI to motivate and guide your day.

Explore Now

AI Tarot Card Reader

Reveal insights about your future, love, and career with AI tarot readings.

Read Tarot

Love Match Calculator

Check compatibility and love predictions using AI-based analysis.

Check Match

Fortune Cookie

Open an AI fortune cookie and receive wisdom, luck, and fun messages.

Open Cookie

Quiz Categories

Engage with knowledge-based and fun quizzes across multiple categories.

Start Quiz

Panchang Calendar

View daily Panchang, auspicious timings, tithi, nakshatra, and festivals.

View Panchang

Online Numerology

Discover your destiny number, life path, and numerology predictions.

Calculate Now

Spiritual Feeds

Stay connected with spiritual thoughts, mantras, and divine content.

View Feeds

Quiz Hub

Attempt trending quizzes on GK, spirituality, festivals, and more.

Explore Quizzes