Lucas Krause19,924 Points
Why is it good practice to declare an empty array and then push the items to that array?
It's a good practice to declare products first as an empty array.
What's the advantage over declaring and filling the array in one step?
Thomas King15,197 Points
When you declare an empty array from the start, and THEN fill the array with data later on in the program, you prevent multiple errors from occurring because of a faulty array.
It is useful to know that the information you are using is bugged, rather than to have the array itself be bugged. It saves you some time debugging your program.