js Uncaught TypeError: undefined is not a function

如下代码:

var columns={};

var column={};

column.name='张三';

columns.push(column);

会出现Uncaught TypeError: undefined is not a function 此错误,改成var columns=[]便可。

原文地址:https://www.cnblogs.com/oymx/p/3756664.html