i have the following code:
The part that I don't understand is that when the alert pops up it shows...Code:var my_deck=new Array(1,2,3,4,5); var area_deck=new Array(); function ShuffleDeck(){ area_deck=my_deck; area_deck[0]="a"; alert(my_deck) } ShuffleDeck()
Why is this happening and how can I fix it. I don't see how the "a" ends up in the my_deck array when i made the change to the area_deck.Code:a,2,3,4,5
Bookmarks