makes a shallow copy of an object
source | object | the source (passed) object |
object | the copy of the source object |
var obj1 = {name:"flower", type:"rose", colors: ['red','pink','white','yellow'] }
var obj2 = webix.clone(obj1);
obj1.type = 'tulip';
obj1.type // -> 'tulip'
obj2.type // -> 'tulip'
obj2.colors // -> ['red'] Warning! It's a shallow copy