Skip to content

Commit bfdff10

Browse files
makepanicjenweber
authored andcommitted
docs: fix minor typos and invalid JavaScript (ember-learn#596)
see ember-learn/guides-source#588
1 parent 3063d47 commit bfdff10

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

guides/release/working-with-javascript/classic-classes.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ let tom = Person.create();
6767
Unlike native classes, you _cannot_ use the `new` keyword to create instances of
6868
classic classes. Attempting to do so will throw an error. Otherwise, instances
6969
are very similar, they can be assigned values like you would on Plain Old
70-
Javascript Objects (POJOs):
70+
JavaScript Objects (POJOs):
7171

7272
```js
7373
let tom = Person.create();
@@ -293,7 +293,7 @@ mel.name = 'Melanie Sumner'; // Cannot set property name of #<Class> which has o
293293
```
294294

295295
We need to add a _setter_ in order to be able to set it. Generally, the setter
296-
function stores the value somewher, and the getter function retrieves it:
296+
function stores the value somewhere, and the getter function retrieves it:
297297

298298
```js
299299
const Person = EmberObject.extend({
@@ -486,7 +486,7 @@ _overriden_, and their values will be fully replaced on the child:
486486
```js
487487
const Vehicle = EmberObject.extend({
488488
move() {
489-
console.log('moving');
489+
console.log('moving!');
490490
},
491491
});
492492

@@ -518,7 +518,7 @@ const Vehicle = EmberObject.extend({
518518
const Aircraft = Vehicle.extend({
519519
move() {
520520
this._super();
521-
console.log('flying');
521+
console.log('flying!');
522522
},
523523
});
524524

@@ -587,6 +587,7 @@ When doing this, you should keep the following in mind:
587587
```js
588588
class Person extends EmberObject {
589589
constructor() {
590+
super(...arguments);
590591
console.log('constructor: ', this.name);
591592
}
592593

guides/release/working-with-javascript/native-classes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ You can create a new _instance_ of the class using the `new` keyword:
6060
let tom = new Person();
6161
```
6262

63-
Instances are like Plain Old Javascript Objects (POJOs) in many ways. You can
63+
Instances are like Plain Old JavaScript Objects (POJOs) in many ways. You can
6464
assign values to them however you like, and generally treat them the same:
6565

6666
```js
@@ -329,7 +329,7 @@ mel.name = 'Melanie Sumner';
329329
```
330330

331331
We need to add a _setter_ in order to be able to set it. Generally, the setter
332-
function stores the value somewher, and the getter function retrieves it:
332+
function stores the value somewhere, and the getter function retrieves it:
333333

334334
```js
335335
class Person {
@@ -615,7 +615,7 @@ class Vehicle {
615615
class Aircraft extends Vehicle {
616616
move() {
617617
super.move();
618-
console.log('flying');
618+
console.log('flying!');
619619
}
620620
}
621621

guides/release/working-with-javascript/native-vs-classic-class-cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ const Person = EmberObject.extend({
347347
const Aircraft = Vehicle.extend({
348348
move() {
349349
this._super();
350-
console.log('flying');
350+
console.log('flying!');
351351
},
352352
});
353353

0 commit comments

Comments
 (0)