Can anyone explain why this array is only filled out after checking its length?

When stepping forward it would just skip everything in the for loops body. Your explanation does kinda make sense for why the print would fill it out though!