There are very few examples of custom JS that I’m aware of. The only one I could find right now is https://support.advancedcustomfields.com/forums/topic/make-a-true-and-false-switch-flip-another/ which uses the acf.add_action function to add actions to fields.