Check out example codes for "swift empty an array". It will help you in understanding the concepts better.

Code Example 1

myArray.removeAll()

Learn ReactJs, React Native from akashmittal.com