Hi. I have this weird situation. It might be my lack of understanding of the JS language. I have an object with a private member named nodeData. nodeData is an array of YUI HtmlNodes that are used with the TreeView widget(I'm writing some wrapper code around YUI TreeView). Nodes get inserted and retrieved, but when I return the entire array with the getData() function, and I print it out either with alert or YAHOO.log() it shows up empty and also it's length property gives a length of 0. But when I loop over it or access individual elements it works fine, proving that the array actually is NOT empty. What the hell is going on? YAHOO.LogicFlux.TreeView.HtmlTreeNodes = function () { var nodeData = []; var keyMap = {}; this.getData = function () { YAHOO.log('nodeData.length in getData = ' + nodeData.length); YAHOO.log('!!nodeData.constructor.toString().match(/array/i)' + !!nodeData.constructor.toString().match(/array/i)); YAHOO.log('nodeData in getData() = ' + nodeData); for(i in nodeData) { YAHOO.log('nodeData[i] in getData() = ' + nodeData[i]); } return nodeData; }; this.deleteNode = function (id) { for (i in nodeData) { if (nodeData[i].getElId() == id) { delete nodeData[i]; return true; } } return false; }; this.getByOriginalID = function (id) { YAHOO.log('nodeData in getByOriginalID = ' + nodeData); return nodeData[keyMap[id]]; }; this.insert = function (dataObj) { if (dataObj.data != undefined && dataObj.data.native_id != undefined) { keyMap[dataObj.data.native_id] = dataObj.getElId(); } nodeData[dataObj.getElId()] = dataObj; }; this.moveChildNodes = function (oldParent, newParent) { for (i in nodeData) { if (nodeData[i].parent == oldParent) { yTreeView.popNode(nodeData[i]); nodeData[i].appendTo(newParent); } } }; }; Code (markup):