Skip to content

Commit 517b2e2

Browse files
committed
Question 142
1 parent 26f6a5f commit 517b2e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nl-NL/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4625,7 +4625,7 @@ Na het pushen van `dancing` en `baking` is de waarde van `person.hobbies` gelijk
46254625
46264626
---
46274627
4628-
###### 143. Wat is de uitkomst?
4628+
###### 142. Wat is de uitkomst?
46294629
46304630
```javascript
46314631
class Bird {
@@ -4654,7 +4654,7 @@ const pet = new Flamingo();
46544654
46554655
#### Antwoord: B
46564656
4657-
We create the variable `pet` which is an instance of the `Flamingo` class. When we instantiate this instance, the `constructor` on `Flamingo` gets called. First, `"I'm pink. 🌸"` gets logged, after which we call `super()`. `super()` calls the constructor of the parent class, `Bird`. THe constructor in `Bird` gets called, en logs `"I'm a bird. 🦢"`.
4657+
We declareren de variabele `pet`, wat een instantie is van de class `Flamingo`. Wanneer we deze instantie instantiëren wordt de `constructor` op `Flamingo` aangeroepen. Als eerste wordt `"I'm pink. 🌸"` gelogd, waarna we `super()` aanroepen. `super()` roept de constructor van de bovenliggende class aan, `Bird` in dit geval. De constructor op `Bird` wordt aangeroepen en logt `"I'm a bird. 🦢"`.
46584658

46594659
</p>
46604660
</details>

0 commit comments

Comments
 (0)