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

Code Example 1

let number = 3.0
let result = pow(number, 2)

Learn ReactJs, React Native from akashmittal.com