How To Use Custom JavaScript in Magento 2

Magento 2 applications use RequirJS file and module loader to optimize the loading time of your Magento 2 application including JavaScript files and to manage dependencies of JavaScript resources.

Read more