I am working with vanilla js trying to get an option from a select. When I use the script tag and write the logic in my html file the onchange works. When I move that logic to the .js file I get a method is not defined error. What am I doing wrong?
Here is my code https://codesandbox.io/s/nice-rain-sex12