Javascript Function Load Order

How can I stop a JS Function from running before another function has had an opportunity to load and run if the one i don’t want running first is loaded and called first?