First of all, you have to save the file with .js format. After this, you may add this into the folder http://wp-content/themes/your-theme/js/. When you do this, go to the settings where there will be two options in front of you. Either you can add it to the header, or the footer. This is how simple it can be.
One Thing You Should Never Do
When it comes to importing templates, getting a reliable WordPress website builder will allow you to import templates for just about any topic or any niche with endless customization options.