New course! Every coder should learn Generative AI!
Try a free lesson+ 8
How to clone something with JavaScript ?
I want to clone something with JavaScript , how could i do that ?
9 Answers
+ 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
š¤£