Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 83397c2

Browse files
Replace foot marks with back ticks, per the code examples
1 parent 9b2bb88 commit 83397c2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎presentation.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ let dog = {
8080
cute: true
8181
};
8282

83-
dog.hasOwnProperty('ugly'); // false
84-
dog.hasOwnProperty('cute'); // true
85-
dog.hasOwnProperty('toString'); // false
86-
Object.prototype.hasOwnProperty('toString'); // true
83+
dog.hasOwnProperty(`ugly`); // false
84+
dog.hasOwnProperty(`cute`); // true
85+
dog.hasOwnProperty(`toString`); // false
86+
Object.prototype.hasOwnProperty(`toString`); // true
8787
````
8888

8989
^ toString is another of the five base methods.
@@ -106,14 +106,14 @@ let dog = {
106106
vaccinated: true
107107
};
108108

109-
Object.defineProperty(dog, 'name', {
110-
value: 'Spot',
109+
Object.defineProperty(dog, `name`, {
110+
value: `Spot`,
111111
enumerable: false
112112
});
113113

114-
dog.propertyIsEnumerable('adoptable'); // true
115-
dog.propertyIsEnumerable('vaccinated'); // true
116-
dog.propertyIsEnumerable('name'); // false
114+
dog.propertyIsEnumerable(`adoptable`); // true
115+
dog.propertyIsEnumerable(`vaccinated`); // true
116+
dog.propertyIsEnumerable(`name`); // false
117117

118118
console.log('Please adopt ' + dog.name + '. He’s...');
119119

@@ -182,16 +182,16 @@ dog.toString(); // [object Object]
182182

183183
// Over-ride the inherited toString method in the prototype
184184
dog.toString = function () {
185-
let output = 'This dog is ';
185+
let output = `This dog is `;
186186

187-
output += ((this.adoptable) ? 'adoptable ' : 'not adoptable ');
188-
output += ((this.vaccinated)? 'and vaccinated.' : 'and not vaccinated.');
187+
output += ((this.adoptable) ? `adoptable ` : `not adoptable `);
188+
output += ((this.vaccinated)? `and vaccinated.` : `and not vaccinated.`);
189189

190190
return output;
191191
};
192192

193193
dog.toString(); // This dog is adoptable and not vaccinated.
194-
dog.hasOwnProperty('toString'); // true, because toString shadows the inherited prototype method for toString
194+
dog.hasOwnProperty(`toString`); // true, because toString shadows the inherited prototype method for toString
195195
````
196196

197197
---

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /