Check out example codes for "unity remove gameobject". It will help you in understanding the concepts better.

Code Example 1

// To remove a GameObject use the function 'Destroy()'
Destroy(gameObject);

Code Example 2

Destroy(this.gameObject);

Learn ReactJs, React Native from akashmittal.com