diff --git a/qualdev/compte_rendu_debug.txt b/qualdev/compte_rendu_debug.txt index 0301722f1bf344b68229ee5ea15971f53e1ddd4a..55b504ab519b8d3e29abd02cf30c557a357730a2 100644 --- a/qualdev/compte_rendu_debug.txt +++ b/qualdev/compte_rendu_debug.txt @@ -15,4 +15,5 @@ j = Uncaught ReferenceError : Cannot access 'j' from debugger j = 0, j = 2, j = 4, j = 6, j = 8, j = 10, j = 12, j = 14, j = 16 j ne marche que dans la fonction. -6) +6) Les indices 1 des deux tableaux ont changé. +Seul le premier tableau à changer. diff --git a/qualdev/qualdev/debug1.ts b/qualdev/qualdev/debug1.ts index df42bc805e7ff880ecc23d901b1cd95618cc45cc..5c22fc17ae1a8fa58c3027ca368e9f385a4e9f5c 100644 --- a/qualdev/qualdev/debug1.ts +++ b/qualdev/qualdev/debug1.ts @@ -35,7 +35,8 @@ function deb4():number{ } let tab1= [1,2,3]; -let tab2 = tab1; +let tab2 = [...tab1]; tab1[1] = 5; -console.log(tab1,tab2); \ No newline at end of file +console.log(tab1,tab2); +