DEV Community

Discussion on: Stop using if else

 
rjitsu profile image
Rishav Jadon

Well if you're going that deep, you should know that JavaScript is a prototype based object oriented language, rather than class based, but it still is object oriented, so technically yeah an object is js is an object in OOP

Thread Thread
 
andreidascalu profile image
Andrei Dascalu

As long as you also define methods on the prototype, yes. Object oriented isn't just "call stuff objects". The core of OOP is the communication between objects, regardless of how they are implemented. Encapsulation, inheritance/composition, etc. JS very much an OOP language, but if it's not an instantiated structure according to the definition, it's not an OOP object.

Some comments have been hidden by the post's author - find out more