Skip to content

Commit d5c4fb0

Browse files
Update about.md
1 parent d41997d commit d5c4fb0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

concepts/type-checking/about.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ To clarify, `instanceof` will return whether the first operand is an instance of
5454
class Beverage {
5555
// ...
5656
}
57+
5758
// The Coffee class is a child of the Beverage class.
5859
class Coffee extends Beverage {
5960
// ...
6061
}
62+
6163
const java = new Coffee();
6264

6365
java instanceof Coffee;
@@ -87,10 +89,12 @@ class Coffee {
8789
this.temperature = 'hot';
8890
this.isDarkMatter = undefined;
8991
}
92+
9093
coolDown() {
9194
this.temperature = 'warm';
9295
}
9396
}
97+
9498
const espresso = new Coffee();
9599

96100
'temperature' in espresso;
@@ -124,6 +128,7 @@ class Coffee {
124128
constructor() {
125129
this.temperature = 'hot';
126130
}
131+
127132
coolDown() {
128133
this.temperature = 'warm';
129134
}

0 commit comments

Comments
 (0)