```js
iconLst = iconLst.concat(pages[index].getMisplacedIcons(index));
````
getMisplacedIcons always returns an array, I think that we don't need to declare var movedIcons = null; and check this at the end of the loop. Am I wrong?