Skip to content
Snippets Groups Projects
Commit b35f9ff8 authored by TIRONI Baptiste's avatar TIRONI Baptiste
Browse files

ex2

parent ba9afcff
No related branches found
No related tags found
No related merge requests found
...@@ -13,4 +13,9 @@ function deb2(x: number, y: number) : void { ...@@ -13,4 +13,9 @@ function deb2(x: number, y: number) : void {
y = x; y = x;
x = tmp; x = tmp;
console. log(x, y); console. log(x, y);
} }
\ No newline at end of file
let x = 10;
let y = 20;
deb2(x, y); // 20 10 (echange de valeur)
console.log(x, y); // 10 20 (pas d'échange de valeur car x et y n'ont pas été retournés par la fonction deb2)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment