Skip to content

Commit 82a5684

Browse files
authored
Replace Details of the object model with Using classes guide (mdn#18542)
1 parent 7a7cbb1 commit 82a5684

File tree

15 files changed

+785
-871
lines changed

15 files changed

+785
-871
lines changed

files/en-us/_redirects.txt

Lines changed: 39 additions & 38 deletions
Large diffs are not rendered by default.

files/en-us/_wikihistory.json

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -120612,73 +120612,6 @@
120612120612
"JesseW"
120613120613
]
120614120614
},
120615-
"Web/JavaScript/Guide/Details_of_the_Object_Model": {
120616-
"modified": "2020-04-28T05:04:03.030Z",
120617-
"contributors": [
120618-
"xfq",
120619-
"wbamberg",
120620-
"kp2017",
120621-
"devoutprogrammer",
120622-
"MoTTs",
120623-
"chrisdavidmills",
120624-
"zhuzhangliang",
120625-
"AnirudhKishan",
120626-
"ytxmobile",
120627-
"dennisvang",
120628-
"shadowlion",
120629-
"krisb1220",
120630-
"Wenfang_Du",
120631-
"schlagi123",
120632-
"jamesray1",
120633-
"saintstarrow",
120634-
"gajjargaurav",
120635-
"fscholz",
120636-
"antalovc",
120637-
"cardin",
120638-
"rousan",
120639-
"jjperuzzi",
120640-
"SphinxKnight",
120641-
"andrpueb",
120642-
"nmve",
120643-
"crueschenberg",
120644-
"zhanglianxin",
120645-
"jwsohn",
120646-
"Jeremie",
120647-
"rishianand",
120648-
"taodo2291",
120649-
"gllona",
120650-
"an0o0nym",
120651-
"x2357",
120652-
"vivekoza",
120653-
"Pointy",
120654-
"gportioli",
120655-
"theironprice",
120656-
"romski",
120657-
"teoli",
120658-
"enTropy",
120659-
"ZiyiLIU",
120660-
"bergus",
120661-
"will279",
120662-
"maen78",
120663-
"NinjaTux",
120664-
"kscarfone",
120665-
"xflin",
120666-
"raztus",
120667-
"Sheppy",
120668-
"kro3mer",
120669-
"MDNion",
120670-
"manikk",
120671-
"MiroslavTrninic",
120672-
"ethertank",
120673-
"lmorchard",
120674-
"lincolnbrito",
120675-
"xorgnz",
120676-
"Johnjbarton",
120677-
"user01",
120678-
"Dria",
120679-
"JesseW"
120680-
]
120681-
},
120682120615
"Web/JavaScript/Guide/Expressions_and_Operators": {
120683120616
"modified": "2020-11-19T11:36:18.318Z",
120684120617
"contributors": [

files/en-us/web/javascript/about_javascript/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tags:
1515

1616
JavaScript runs on the client side of the web, which can be used to design / program how the web pages behave on the occurrence of an event. JavaScript is an easy to learn and also powerful scripting language, widely used for controlling web page behavior.
1717

18-
Contrary to popular misconception, **JavaScript is _not_ "Interpreted Java"**. In a nutshell, JavaScript is a dynamic scripting language supporting [prototype based](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#class-based_vs._prototype-based_languages) object construction. The basic syntax is intentionally similar to both Java and C++ to reduce the number of new concepts required to learn the language. Language constructs, such as `if` statements, `for` and `while` loops, and `switch` and `try ... catch` blocks function the same as in these languages (or nearly so).
18+
Contrary to popular misconception, **JavaScript is _not_ "Interpreted Java"**. In a nutshell, JavaScript is a dynamic scripting language supporting [prototype based](/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) object construction. The basic syntax is intentionally similar to both Java and C++ to reduce the number of new concepts required to learn the language. Language constructs, such as `if` statements, `for` and `while` loops, and `switch` and `try ... catch` blocks function the same as in these languages (or nearly so).
1919

2020
JavaScript can function as both a [procedural](https://en.wikipedia.org/wiki/Procedural_programming) and an [object oriented language](/en-US/docs/Learn/JavaScript/Objects). Objects are created programmatically in JavaScript, by attaching methods and properties to otherwise empty objects **at run time**, as opposed to the syntactic class definitions common in compiled languages like C++ and Java. Once an object has been constructed it can be used as a blueprint (or prototype) for creating similar objects.
2121

files/en-us/web/javascript/closures/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,4 +573,4 @@ MyObject.prototype.getMessage = function () {
573573
};
574574
```
575575

576-
In the two previous examples, the inherited prototype can be shared by all objects and the method definitions need not occur at every object creation. See [Details of the Object Model](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model) for more.
576+
In the two previous examples, the inherited prototype can be shared by all objects and the method definitions need not occur at every object creation. See [Inheritance and the prototype chain](/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) for more.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

files/en-us/web/javascript/guide/details_of_the_object_model/index.md

Lines changed: 0 additions & 752 deletions
This file was deleted.

files/en-us/web/javascript/guide/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,14 @@ Overview: [Working with objects](/en-US/docs/Web/JavaScript/Guide/Working_with_O
119119
- [Defining methods](/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#defining_methods)
120120
- [Getter and setter](/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#defining_getters_and_setters)
121121

122-
## Details of the object model
122+
## Using classes
123123

124-
Overview: [Details of the object model](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model)
124+
Overview: [Using classes](/en-US/docs/Web/JavaScript/Using_Classes)
125125

126-
- [Prototype-based OOP](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#class-based_vs._prototype-based_languages)
127-
- [Creating object hierarchies](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#creating_the_hierarchy)
128-
- [Inheritance](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#property_inheritance_revisited)
126+
- [Declaring a class](/en-US/docs/Web/JavaScript/Using_Classes#declaring_a_class)
127+
- [Various class features](/en-US/docs/Web/JavaScript/Guide/Using_Classes#constructor)
128+
- [Extends and inheritance](/en-US/docs/Web/JavaScript/Guide/Using_Classes#extends_and_inheritance)
129+
- [Why classes?](/en-US/docs/Web/JavaScript/Guide/Using_Classes#why_classes)
129130

130131
## Promises
131132

files/en-us/web/javascript/guide/introduction/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ In contrast, JavaScript descends in spirit from a line of smaller, dynamically t
5959
| Variable data types are not declared (dynamic typing, loosely typed). | Variable data types must be declared (static typing, strongly typed). |
6060
| Cannot automatically write to hard disk. | Can automatically write to hard disk. |
6161

62-
For more information on the differences between JavaScript and Java, see the chapter [Details of the object model](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model).
63-
6462
## JavaScript and the ECMAScript specification
6563

6664
JavaScript is standardized at [Ecma International](https://www.ecma-international.org/) — the European association for standardizing information and communication systems (ECMA was formerly an acronym for the European Computer Manufacturers Association) to deliver a standardized, international programming language based on JavaScript. This standardized version of JavaScript, called ECMAScript, behaves the same way in all applications that support the standard. Companies can use the open standard language to develop their implementation of JavaScript. The ECMAScript standard is documented in the ECMA-262 specification.

0 commit comments

Comments
 (0)