javascript数组返回undefined

时间:2015-01-19 04:43:35

标签: javascript

当我循环遍历一个数组时,我将整个数组放到控制台并显示这些项目,在循环时想到它返回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]);

enter image description here

0 个答案:

没有答案