@@ -75,9 +75,10 @@ Waiting a certain amount of time can be easily done using the [`setTimeout()`](h
> **danger** Regular functions declared with the **`function` keyword have `this` inherited from the caller**, whereas **arrow functions have a `this` inherited from the declaring scope**.
<details><summary> Show the game.js file </summary>
=== "game.js - with function"
```javascript
``` js
export class GameComponent {
goToScore() {
// ...
...
...
@@ -100,7 +101,7 @@ Waiting a certain amount of time can be easily done using the [`setTimeout()`](h
=== "game.js - with arrow function"
```javascript
``` js
export class GameComponent {
goToScore() {
// ...
...
...
@@ -117,6 +118,28 @@ Waiting a certain amount of time can be easily done using the [`setTimeout()`](h
}
}
```
=== "C"
``` c
#include <stdio.h>
int main(void) {
printf("Hello world!\n");
return 0;
}
```
=== "C++"
``` c++
#include <iostream>
int main(void) {
std::cout << "Hello world!" << std::endl;
return 0;
}
```
</details>
## Template literals
...
...
@@ -158,3 +181,4 @@ src/app/scripts/welcome.js
- [ ] I know what is the _bound this_ of a function