Check out example codes for "unity destroy all objects with tag". It will help you in understanding the concepts better.

Code Example 1

GameObject[] enemies = GameObject.FindGameObjectsWithTag("Enemy");   
foreach(GameObject enemy in enemies)  
{
	GameObject.Destroy(enemy);
}

Learn ReactJs, React Native from akashmittal.com