diff --git a/exo3.ts b/exo3.ts index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1c0a8936d1fdcf776b95d8801e56fb2731a66789 100644 --- a/exo3.ts +++ b/exo3.ts @@ -0,0 +1,11 @@ +function deb2(x: number, y:number): void { + const tmp = y; + y = x; + x = tmp; + console.log(x, y); +} + +let x = 10; +let y = 20; +deb2(x, y); +console.log(x, y);