Changed the sample JavaScript function to return a value to the Swift side of the application. Also changed the Swift side to have a completion closure to work with the value returned from JavaScript.