Check out example codes for "how to destroy a gameobject in c#". It will help you in understanding the concepts better.

Code Example 1

Destroy(gameObject); // destroys the game object attached to the script

Learn ReactJs, React Native from akashmittal.com