How to run appium with existing javascript file?

I have some web automation scripts written in Javascript and want to re-use the JavaScript files for iOS automation. Can you please let me know how to do it?

I have set up Appium GUI and written some simple Java tests which work on iPhone simulator. However, I did not find instructions of how to execute JavaScript tests on iPhone simulator with Appium.

Please let me know how to run JavaScript with Appium.

Thanks a lot in advance!

Regards,
Selina.