Skip to content
Snippets Groups Projects
Commit 08eea450 authored by SWIATOKA Maximilien's avatar SWIATOKA Maximilien
Browse files

Replace td_debug.ts

parent 08da2e79
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ function deb1(): number {
return j;
}
console.log(deb1());
//console.log(deb1());
//exercice3
......@@ -17,10 +17,37 @@ function deb2(x: number, y: number): void {
const tmp = y;
y = x;
x = tmp;
console.log(x, y);
//console.log(x, y);
}
let x = 10;
let y = 10;
deb2(x, y);
console.log(x, y);
//console.log(x, y);
//exercice 4
function deb3(xy: number[]): void {
let tmp = xy[0];
xy[0] = xy[1];
xy[1] = tmp;
console.log(xy);
}
let xy = [10, 20];
deb3(xy);
console.log(xy);
//exercice 5
let j = 10;
deb4();
console.log(j);
function deb4(): number {
let j = 25;
for (let i = 0; i < 10; i++) {
let j = 2 * i;
console.log(j);
}
return j;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment