Telash
Telash8mo ago

telash – 16-40 Feb 27

arr1=[1,2,3] arr2=arr1 what are the possible use cases of the code above, without spread operator? why not simply use arr1 instead of arr2
4 Replies
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
Telash
Telash8mo ago
Yeah I know that, im asking why pass by reference exist, instead of that, simply use the first variable that you referencing Like, why in order to change arr1 I would want to make another variable Like, arr1=[1,2,3] arr2=arr1 in order to pop 3 from arr1, i can now do arr2.pop(), but why? i can simply do arr1.pop()
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
reactibot
reactibot8mo ago
This thread hasn’t had any activity in 36 hours, so it’s now locked. Threads are closed automatically after 36 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1212076817549230160