Skip to content
Snippets Groups Projects
Commit 797abf92 authored by Aurélien's avatar Aurélien
Browse files

Ex6 p2

parent fa3ce89a
No related branches found
No related tags found
No related merge requests found
let tab1 = [1,2,3 ];
let tab2 = tab1;
let tab1 = [1,2,3];
let tab2 = [...tab1];
tab1[1] = 5;
console.log(tab1, tab2);
/* tab1 et tab2 pointent vers le même tableau donc modifier tab 1 modifie tab2 */
\ No newline at end of file
/* 1) tab1 et tab2 sont des tableaux différents donc modifier tab1 ne modifie pas tab2 */
\ 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