Check out example codes for "add to beginning of array swift". It will help you in understanding the concepts better.

Code Example 1

someArray.insert(someValue, atIndex: 0)

Code Example 2

//Swift 4
someArray.insert(someValue, at: 0)

Learn ReactJs, React Native from akashmittal.com