Object-oriented programming (OOP) is a popular programming paradigm or style of programming. It’s been around since ‘70s, but unlike tools and frameworks that come and go, OOP is still very relevant today. That’s because it’s not a programming language or a tool. It’s a style of programming.
Object-oriented Programming in JavaScript
Why learn OOP?
OOP helps you manage and reduce complexity in software by building re-usable building blocks (objects). Properly designed objects provide a simple interface and hide the unnecessary complexity from the outside, just like a DVD player! A DVD player has a complex logic board on the inside and a few buttons on the outside. When you press the play button, you don’t care how all those microchips talk to each other.
Object-oriented programming helps you:
- Manage and reduce complexity
- Eliminate redundant code
- Build re-usable building blocks
- Write cleaner code
An essential skills for every developer:
OOP comes up in many technical interviews. So if you really want to be a serious developer, you need to understand object-oriented programming. As a technical interviewer myself, if I see a candidate with OOP on their resume, that candidate stands out to me.
It may interest you to know that many of the popular frameworks out there that you might be using are actually designed with OOP concepts in mind. Angular is an example of such frameworks!
A Step-by-Step, A to Z course:
What you'll get when you sign up for this course:
- Learn all about object-oriented programming in JavaScript
- No more wasting time on disjointed tutorials
- Learn at your own pace - lifetime access - so take your time if you prefer
- Watch on any device, online or offline
- Solidify your understanding of JavaScript
- Prepare for technical interviews
- Confidently build applications with Node, Angular, React, Vue and other JavaScript libraries
- Learn the best practices and common pitfalls to avoid
- Certificate of completion to present to your employer
You'll learn:
- The core principles of OOP: encapsulation, abstraction, inheritance and polymorphism
- How to implement OOP concepts in JavaScript
- All about objects, their properties, property descriptors, getters and setters
- Difference between factory and constructor functions
- How "this" works in JavaScript
- Prototypes and prototypical inheritance: one of the confusing parts of JavaScript
- ES6+ features used in object-oriented programming
About the Authors
Mosh Hamedani (Code with Mosh)
Mosh Hamedani is the founder of Code with Mosh, one of the highest-volume independent online instructors in software education. He has been publishing courses continuously since the early Udemy era and has taught over a million students across his Udemy catalog and his standalone Code with Mosh platform. His teaching style is patient, rigorously structured, and deliberately beginner-tolerant — the courses are widely cited as some of the most accessible introductions to their respective topics.
The Code with Mosh catalog covers an unusually wide span: web development with HTML / CSS / JavaScript / React / Angular / Node.js, Python and Django, C# and .NET, mobile development with React Native and Flutter, SQL and database fundamentals, and the algorithm / data-structure interview prep tracks. Few independent instructors maintain this much breadth at consistent quality.
The CourseFlix listing under this source carries over 35 Code with Mosh courses spanning that range. Material is paid; Code with Mosh runs on per-course pricing on the original platform. Courses are aimed primarily at developers picking up a new technology from a clean start through to working production proficiency.
Udemy
Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.
Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.
Watch Online 57 lessons
| # | Lesson Title | Duration | Access |
|---|---|---|---|
| 1 | What is OOP? Demo | 01:46 | |
| 2 | Four Pillars of OOP | 07:03 | |
| 3 | Setting Up the Development Environment | 02:17 | |
| 4 | Course Structure | 02:56 | |
| 5 | 1- Introduction | 00:46 | |
| 6 | 2- Object Literals | 03:04 | |
| 7 | 3- Factories | 02:52 | |
| 8 | 4- Constructors | 05:37 | |
| 9 | 5- Constructor Property | 02:25 | |
| 10 | 6- Functions are Objects | 04:48 | |
| 11 | 7- Value vs Reference Types | 05:50 | |
| 12 | 8- Adding or Removing Properties | 03:54 | |
| 13 | 9- Enumerating Properties | 02:51 | |
| 14 | 10- Abstraction | 04:03 | |
| 15 | 11- Private Properties and Methods | 04:06 | |
| 16 | Getters and Setters | 05:37 | |
| 17 | 14- Exercise- Stop Watch | 02:09 | |
| 18 | 15- Solution- Stopwatch | 02:32 | |
| 19 | 1- Inheritance | 02:27 | |
| 20 | 2- Prototypes and Prototypical Inheritance | 05:34 | |
| 21 | 3- Multi-level Inheritance | 02:52 | |
| 22 | 4- Property Descriptors | 05:08 | |
| 23 | 5- Constructor Prototypes | 03:53 | |
| 24 | 6- Prototype vs. Instance Members | 06:05 | |
| 25 | 7- Iterating Instance and Prototype Members | 02:40 | |
| 26 | 8- Avoid Extending the Built-in Objects | 01:42 | |
| 27 | 10- Exercise | 01:34 | |
| 28 | 11- Solution | 05:39 | |
| 29 | 1- Creating Your Own Prototypical Inheritance | 05:35 | |
| 30 | 2- Resetting the Constructor | 04:02 | |
| 31 | 3- Calling the Super Constructor | 03:49 | |
| 32 | 4- Intermediate Function Inheritance | 03:06 | |
| 33 | 5- Method Overriding | 03:30 | |
| 34 | 6- Polymorphism | 04:23 | |
| 35 | 7- When to Use Inheritance | 03:24 | |
| 36 | 8- Mixins | 05:54 | |
| 37 | 10- Exercise Prototypical Inheritence | 03:19 | |
| 38 | 11- Solution Prototypical Inheritance | 05:54 | |
| 39 | 12- Exercise- Polymorphism | 02:36 | |
| 40 | 13- Solution- Polymorphism | 05:12 | |
| 41 | 1- ES6 Classes | 05:42 | |
| 42 | 2- Hoisting | 03:47 | |
| 43 | 3- Static Methods | 04:18 | |
| 44 | 4- The This Keyword | 04:58 | |
| 45 | 5- Private Members Using Symbols | 07:49 | |
| 46 | Private Members Using WeakMaps | 06:59 | |
| 47 | 7- Getters and Setters | 02:51 | |
| 48 | Inheritance | 04:01 | |
| 49 | 9- Method Riding | 02:34 | |
| 50 | 11- Exercise | 03:26 | |
| 51 | 12- Solution | 04:21 | |
| 52 | 1- Modules | 03:43 | |
| 53 | 2- CommonJS Modules | 05:52 | |
| 54 | 3- ES6 Modules | 03:25 | |
| 55 | 4- ES6 Tooling | 01:27 | |
| 56 | 5- Babel | 07:12 | |
| 57 | 6- Webpack | 08:27 |
Get instant access to all 56 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.
Learn more about subscriptionRelated courses
-
Updated 2y agoShaders for the Web
By: SuperHiLearn how to make OpenGL shaders using the programming language GLSL, and gain insight on how the top websites use hardware-enabled graphics.16h 3m -
Updated 2y agoAdvanced JavaScript
By: UI.dev (Tyler McGinnis)I'm not good at writing sales copy, just trust me that if you use JavaScript in any capacity.3h 5m3/5 -
Updated 2y agoMachine Learning in JavaScript with TensorFlow.js
By: UdemyInterested in using Machine Learning in JavaScript applications and websites? Then this course is for you! This is the tutorial you've been looking for to becom6h 42m