diff --git a/Exo.ts b/Exo.ts index a5ee1912bbeffa45b9366636907b4ff80d05af6b..52817e0d1bdfdc896b80761707b6121780284625 100644 --- a/Exo.ts +++ b/Exo.ts @@ -55,3 +55,11 @@ let tab4 = [ ... tab1]; //[...] crée une copie indépendante du tableau tab3[1] = 5; //n'affecte pas tab4 console. log(tab3, tab4); //Dans le second cas, tab2 est une nouvelle copie indépendante de tab1, ce qui évite les modifications involontaires. + +multiplication(5, 3); + +function multiplication(x: number, y: number) : number { //deb7 devient multiplication + if (y === 0) { + return 0;} + return x * y; +} \ No newline at end of file