Is there any way to make something load before something else?

Like lets say i want a javascript to run right in the start?