Global function in client script

Global function in client script

Hi,


I was wondering of there is a way to have a global function/variable in client script so we can use it in different client script events ?
Lets say I want a function to be run in a value changed in 10 different fields and in different modules.