我在节点 js 中有这样的模块
var types = function (){
var typeList= new Array();
typeList[0] = "varchar";
var numericDTs= new Array();
numericDTs[0] = "tinyint";
var binaryDTs= new Array();
binaryDTs[0] = "tinyblob";
var data = array();
data[0] = typeList;
data[1] = numericDTs;
data[2] = binaryDTs;
return data;
}
module.exports = {
types: types,
}
我这样称呼这个模块
var types = require("./include/types");
console.log(types.types());
我得到了这样的错误 500 ReferenceError: array is not defined 如果我只返回类型或 typeList 或 binaryDTs,则没有错误。如何在节点js中返回数组数组?