Check out example codes for "destroy all objects under parent unity c#". It will help you in understanding the concepts better.
Code Example 1
foreach (Transform child in transform) {
Destroy(child.gameObject);
}
Code Example 2
foreach (Transform child in TextHolder.transform) { GameObject.Destroy(child.gameObject); }
Learn ReactJs, React Native from akashmittal.com