我有以下代码
for(i = 0; i < num; i++) {
var yPos = 10*i;
var numCells = wid/30;
for(j = 0; j < numCells; j++) {
blocks[i][j] = 1;
}
}
和
blocks = new Array();
但是,当我执行代码时,我收到一条错误消息:
can't convert undefined to object
有任何想法吗?:/