Why is the hits array empty?


Trying to understand the logic behind "var hits= [ ]" and how this is then used to call and log the final result. My code works, but I simply don't understand why. Can someone provide a quick explanation?


Please present the code you are using....


You start with an empty array and fill it later by hits.push(...).