Captivate 2017 – Using Actionscript vs Javascript

We are using an On Exit Action that runs an actionscript to run a javascript to close the project. Is there any necessary reason, or advantage, to run this action in this manner, or can we just set the Action to run the javascript? Thank you in advance.