How can I make a JavaScript function public?

The question says it all. Thanks in advance.

Add ‘public’ before whatever you need public and you should be able to access it from another script.