I don’t really code in JavaScript, but I think I am safe to assume that when you reference this inside of Unity, it is referring to the instance of the script and not the game object itself. You should only have to call:
Destroy( gameObject );
to reference the gameObject to destroy. If the script is attached to each box, this would work. If it is inside of the “bullet” that you’re using to shoot, then you would have to call: