当我循环遍历一个数组时,我将整个数组放到控制台并显示这些项目,在循环时想到它返回undefined ......怎么样?!?
console.log("CONNECTORS....");
var connectors = userItem.connectors;
if (connectors.length > 0)
console.log(userItem.connectors);
for (connectorIndex = 0, sublen = connectors.length; connectorIndex < sublen; connectorIndex += 1) {
console.log("CONNECTORS INDEX " + connectorIndex);
console.log(connectors[connectorIndex]);