Javascript examples for jQuery Method and Property:extend
object[property].push() vs jQuery.extend()
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.4.js"></script> <script type="text/javascript"> $(window).load(function(){//w w w . j av a 2s .c o m a={}; a['herp']=['derp']; var b = jQuery.extend(true, {}, a); b['herp'].push('foo'); console.log(a['herp']); console.log(b['herp']); }); </script> </head> <body> </body> </html>