+ 8
How to clone something with JavaScript ?
I want to clone something with JavaScript , how could i do that ?
9 Antworten
+ 6
Calviղ 我想要复制球 🔴
+ 6
I want to clone circles or balls ⏺⭕
+ 4
Calviղ I never thought it was as simple, miracles of JavaScript :-D
+ 3
var x=1;
var y=x;
// you already cloned y with x. 😅
+ 3
Bono Don't try that with Arrays, if you do, you'll get unexpected results coz you didn't actually clone anything
+ 2
Ipang That's the simplest form of clone. Of course if we want to clone a multilevel array, it would be more complicated.
Anyway the question not mention so.
+ 1
Bono 你打算复制什么 可以用中文书写?
0
🤣