Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | SMaiLubis |
i need help for remove element array
i have script:
var a = ["a", "b", "c", "d", "e"]
func _on_Button_pressed():
var b = a
b.remove(1)
print(a)
print(b)
output is
[a, c, d, e]
[a, c, d, e]
what i want is
[a, b, c, d, e]
[a, c, d, e]
everytime i remove element of b, element of a is removed too
can anyone help me?