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

Code Example 1

[SerializeField] GameObject MyGreatObject;
//Choose MyGreatObject in the inspector
Destroy (MyGreatObject, 5);

Learn ReactJs, React Native from akashmittal.com