2012-07-01から1ヶ月間の記事一覧
jQuery を使っていると超シンプル。 // Shallow copy var newObject = jQuery.extend({}, oldObject);// Deep copy var newObject = jQuery.extend(true, {}, oldObject); What is the most efficient way to clone a JavaScript object? - Stack Overflow …
jQuery を使っていると超シンプル。 // Shallow copy var newObject = jQuery.extend({}, oldObject);// Deep copy var newObject = jQuery.extend(true, {}, oldObject); What is the most efficient way to clone a JavaScript object? - Stack Overflow …