Console.log is not working after for loop

export function makeWallRepeater(){
        console.log(itemArr.length + " " + " Array Length") ;
 for(let i = 0 ; i < itemArr.length; i++){
            repeaterArr.push({
 "_id":itemArr[i],
 "image":itemArr[i].wallpaperImage
            })
        }
    console.log("Hey test");
  }  

The initial console.log before the for loop prints but the one after for loop does not, The itemArr isn’t empty either since it prints length, it contains an array of objects, what am I missing here?

Try to put the console.log inside the array, not outside and see what happens. And you do realize you are stuffing an entire array entry inside _id, dont you? Maybe it should be:

"_id":itemArr[i]._id,

Thanks a lot, I missed this detail!