diff --git a/resources/docs/docs/chapters/tp/arrow-functions.md b/resources/docs/docs/chapters/tp/arrow-functions.md index 459c68bb4d57c6a7f48e4b35cbfb009caab2c6c7..83c8c11089a2fc10ae2933a89dff5cbe56837448 100644 --- a/resources/docs/docs/chapters/tp/arrow-functions.md +++ b/resources/docs/docs/chapters/tp/arrow-functions.md @@ -127,20 +127,40 @@ Concatenating strings is not something we enjoy in any language. Fortunately, _E === "without template literals" -```js -const welcome = - "welcome back " + user.name + ".\n" - + "You have " + messages.length + " message" + messages.length ? "s" : "" + "to read."; -``` + ```js + const welcome = + "welcome back " + user.name + ".\n" + + "You have " + messages.length + " message" + messages.length ? "s" : "" + "to read."; + ``` === "with template literals" -```js -const welcome = - `welcome back ${user.name}. -You have ${messages.length} message${messages.length ? "s" : ""} to read.`; -``` + ```js + const welcome = + `welcome back ${user.name}. + You have ${messages.length} message${messages.length ? "s" : ""} to read.`; + ``` +=== "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; + } + ``` ### Use backquotes instead of quotes <Diy />