P
Parv G.
Hello,
Looking for you suggestions.
1. array = %w(a b c d e)
2. tempArray = array
3. array.clear
4. puts tempArray.length
line 4 outputs: 0
Why does my tempArray get cleared also?
Any suggestions on how to keep the tempArray content from clearing out?
Thanks
Looking for you suggestions.
1. array = %w(a b c d e)
2. tempArray = array
3. array.clear
4. puts tempArray.length
line 4 outputs: 0
Why does my tempArray get cleared also?
Any suggestions on how to keep the tempArray content from clearing out?
Thanks