原文链接:http://www.cnblogs.com/xljzlw/p/3775162.html var zlw = { name: "zlw", sayHello: function (age) { console.log("hello, i am ", this.name + " " + age " years old"); } }; var xlj = { name: "xlj", }; zlw.s…
数组追加 //用apply拼接 var arr1=[12,'name:foo',2048]; var arr2=['Joe','Hello']; Array.prototype.push.apply(arr1,arr2); console.log(arr1);//(5) [12, "name:foo", 2048, "Joe", "Hello"] //用call拼接 var arr1=[12,'name:foo',2048]; var arr2=…