Need help with JS creating flags in the dropdown.

I have a script supplied from my currency converter plugin. The script ads a flag icons to a dropdown menu. I’m having a tough time getting it to load in the WP install. I’ve tried loading the script into the window here as JS.