标签:contain type nta object 对象 toc 记录 转换 ons
无法将undefined或者null转换为对象
arr1 = [1, 2, 3];
arr1.push.apply(null, arr2);
console.log(arr1);
Cannot convert undefined or null to object
at push (<anonymous>)
var arr1 = [1, 2, 3];
var arr2 = [4, 5, 6];
Array.prototype.push.apply(arr1, arr2);
console.log(arr1);
或者
arr1 = [1, 2, 3];
arr1.push.apply(arr1, arr2);
console.log(arr1);
标签:contain type nta object 对象 toc 记录 转换 ons
原文地址:https://www.cnblogs.com/Syinho/p/13356649.html