From 171f1f15ac9006baa13fb2ad7765b5f9a316d6c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Bailly?=
 <clement.bailly3@etu.univ-lorraine.fr>
Date: Sat, 29 Mar 2025 18:54:44 +0100
Subject: [PATCH] TD Debug exo6

---
 qualdev/compte_rendu_debug.txt | 3 ++-
 qualdev/qualdev/debug1.ts      | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/qualdev/compte_rendu_debug.txt b/qualdev/compte_rendu_debug.txt
index 0301722..55b504a 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 df42bc8..5c22fc1 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);
+
-- 
GitLab