From 09d085e060e71ca1852d7043caba37fcd37aad5b Mon Sep 17 00:00:00 2001 From: oabdelnour <oabdelnour@takima.fr> Date: Mon, 26 Feb 2024 16:25:51 +0100 Subject: [PATCH] wip --- .../docs/docs/chapters/tp/arrow-functions.md | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/resources/docs/docs/chapters/tp/arrow-functions.md b/resources/docs/docs/chapters/tp/arrow-functions.md index 6256463..475d99e 100644 --- a/resources/docs/docs/chapters/tp/arrow-functions.md +++ b/resources/docs/docs/chapters/tp/arrow-functions.md @@ -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 - [ ] I know about template literals - [ ] The application runs as usual + -- GitLab