well ... not really. There's the so-called object notation in JS and the definition of an object as per OOP, which on a higher level is the data represented + methods (any methods, regardless whether you implement encapsulation or not). An "object" { "foo": "bar" }; might be called an object in JS notation, but no in OOP as it lacks methods and a definition (eg: a class of which the object should be an instance of).
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
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
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
well ... not really. There's the so-called object notation in JS and the definition of an object as per OOP, which on a higher level is the data represented + methods (any methods, regardless whether you implement encapsulation or not). An "object" { "foo": "bar" }; might be called an object in JS notation, but no in OOP as it lacks methods and a definition (eg: a class of which the object should be an instance of).
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
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.