Skip to main content
Active reading [<https://en.wikipedia.org/wiki/JavaScript> <https://en.wiktionary.org/wiki/per_se#Adverb> <https://en.wikipedia.org/wiki/ECMAScript> <https://en.wikipedia.org/wiki/Object-orientation>]. Expanded.
Source Link
Peter Mortensen
  • 31.2k
  • 22
  • 111
  • 134

Well, JavaScript per sise can differ greatly from platform to platform as it is always an implementation of the original specification EcmaScriptECMAScript (ES).

In any case, independently of the implementation, all JavaScript implementations that follow the EcmaScriptECMAScript specification right, will give you an Object Oriented Languageobject-oriented language. According to the ES standard:

ECMAScript is an objectis an object-oriented programming languageprogramming language for performing computationscomputations and manipulatingmanipulating computational objects within a host environmenta host environment.

So now that we have agreed that JavaScript is an implementation of EcmaScriptECMAScript and therefore it is an object-oriented language. The definition of the new operation in any Objectobject-oriented language, says that such a keyword is used to create an object instance from a class of a certain type (including anonymous types, in cases like C#).

In EcmaScriptECMAScript we don't use classes, as you can read from the specsspecifications:

ECMAScript does not use classes such as those in C++, Smalltalk, or Java. Instead objects may be created in various ways including via a literal notation or via constructors which create objects and then execute code that initializes all or part of them by assigning initial values to their properties. Each constructor is a function that has a property named ― prototype ‖ that is used to implement prototype - based inheritance and shared properties. Objects areare created by
by using constructors inconstructors in new expressions; for examplefor example, new Date(2009,11) creates a new Date object. Invoking a constructor without using new has consequences that depend on the constructorconstructor. For exampleexample, Date() produces a string representationa string representation of thethe current date anddate and time rather than an object.

Well JavaScript per si can differ greatly from platform to platform as it is always an implementation of the original specification EcmaScript.

In any case, independently of the implementation all JavaScript implementations that follow the EcmaScript specification right, will give you an Object Oriented Language. According to the ES standard:

ECMAScript is an object-oriented programming language for performing computations and manipulating computational objects within a host environment.

So now that we have agreed that JavaScript is an implementation of EcmaScript and therefore it is an object-oriented language. The definition of the new operation in any Object-oriented language, says that such keyword is used to create an object instance from a class of a certain type (including anonymous types, in cases like C#).

In EcmaScript we don't use classes, as you can read from the specs:

ECMAScript does not use classes such as those in C++, Smalltalk, or Java. Instead objects may be created in various ways including via a literal notation or via constructors which create objects and then execute code that initializes all or part of them by assigning initial values to their properties. Each constructor is a function that has a property named ― prototype ‖ that is used to implement prototype - based inheritance and shared properties. Objects are created by
using constructors in new expressions; for example, new Date(2009,11) creates a new Date object. Invoking a constructor without using new has consequences that depend on the constructor. For example, Date() produces a string representation of the current date and time rather than an object.

Well, JavaScript per se can differ greatly from platform to platform as it is always an implementation of the original specification ECMAScript (ES).

In any case, independently of the implementation, all JavaScript implementations that follow the ECMAScript specification right, will give you an object-oriented language. According to the ES standard:

ECMAScript is an object-oriented programming language for performing computations and manipulating computational objects within a host environment.

So now that we have agreed that JavaScript is an implementation of ECMAScript and therefore it is an object-oriented language. The definition of the new operation in any object-oriented language, says that such a keyword is used to create an object instance from a class of a certain type (including anonymous types, in cases like C#).

In ECMAScript we don't use classes, as you can read from the specifications:

ECMAScript does not use classes such as those in C++, Smalltalk, or Java. Instead objects may be created in various ways including via a literal notation or via constructors which create objects and then execute code that initializes all or part of them by assigning initial values to their properties. Each constructor is a function that has a property named ― prototype ‖ that is used to implement prototype - based inheritance and shared properties. Objects are created by using constructors in new expressions; for example, new Date(2009,11) creates a new Date object. Invoking a constructor without using new has consequences that depend on the constructor. For example, Date() produces a string representation of the current date and time rather than an object.

Source Link
João Pinho
  • 3.8k
  • 1
  • 21
  • 29

Well JavaScript per si can differ greatly from platform to platform as it is always an implementation of the original specification EcmaScript.

In any case, independently of the implementation all JavaScript implementations that follow the EcmaScript specification right, will give you an Object Oriented Language. According to the ES standard:

ECMAScript is an object-oriented programming language for performing computations and manipulating computational objects within a host environment.

So now that we have agreed that JavaScript is an implementation of EcmaScript and therefore it is an object-oriented language. The definition of the new operation in any Object-oriented language, says that such keyword is used to create an object instance from a class of a certain type (including anonymous types, in cases like C#).

In EcmaScript we don't use classes, as you can read from the specs:

ECMAScript does not use classes such as those in C++, Smalltalk, or Java. Instead objects may be created in various ways including via a literal notation or via constructors which create objects and then execute code that initializes all or part of them by assigning initial values to their properties. Each constructor is a function that has a property named ― prototype ‖ that is used to implement prototype - based inheritance and shared properties. Objects are created by
using constructors in new expressions; for example, new Date(2009,11) creates a new Date object. Invoking a constructor without using new has consequences that depend on the constructor. For example, Date() produces a string representation of the current date and time rather than an object.