From ad38a96e861d3b3869e356071ec1c62fde61fdad Mon Sep 17 00:00:00 2001 From: oabdelnour <oabdelnour@takima.fr> Date: Mon, 26 Feb 2024 16:16:22 +0100 Subject: [PATCH] wip --- .../docs/docs/chapters/tp/arrow-functions.md | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/resources/docs/docs/chapters/tp/arrow-functions.md b/resources/docs/docs/chapters/tp/arrow-functions.md index 459c68b..83c8c11 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 /> -- GitLab