Skip to content
Snippets Groups Projects
Commit 66982e7c authored by GAUZERE Julien's avatar GAUZERE Julien
Browse files

Ex7

parent 6455c7f2
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment