is there any tutorial about making js files in xenforo?

I am trying to work with js files in xenforo, It seems there are certain rules that u may follow such as:
XenForo.register('select.PrefixManager', 'XenForo.PrefixManager');
so I wonder if there is any tutorial about how to make js files in xenforo? I googled on line and community, but did not find one.