makes a deep copy of an object/array
source | object| array | the source (passed) object/array |
object| array | the copy of the source object/array |
var obj1 = {name:"flower", type:"rose", colors: ['red','pink','white','yellow'] }
var obj2 = webix.copy(obj1);
obj1.type = 'tulip';
obj1.type // -> 'tulip'
obj2.type // -> 'rose'
obj2.colors // -> ['red','pink','white','yellow']
Doesn't work for structures with inner loops.