Destroy multiple instances of an object

Hi! I am kind of new to Unity so please be patient.

I have a script that Instantiates a crate every two seconds, and that's fine. In my game, when you touch the ground, you lose. I want every instance of the crate to be destroyed when you lose. I imagine it is something that has to do with arrays and tags. I haven't found a solution yet though. How can I do this?

There is this function:

GameObject[] objects = GameObject.FindGameObjectsWithTag("YourTagHere");

You can use it to get an array of GameObjects that share the same tag. Then you can iterate the array and delete them.

for (int i=0; i<objects.Length; i++){
    Destroy(objects*);*
*}*
*```*
*<p><a href="http://unity3d.com/support/documentation/ScriptReference/GameObject.FindGameObjectsWithTag.html?from=index" rel="nofollow">Click here to go to the reference page for this method</a></p>*