Drupal 7 Equivalent Of WP's wp_enqueue_script

Hello,

I’m building a custom theme and had a question regarding loading custom javascript. For example, WP has a function called wp_enqueue_script() which you can use to load js libraries such as jQuery if it has not already been loaded through a plugin / module etc. and also control the order libraries or scripts load. Does Drupal 7 have a similar function?

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/3/feed