I can’t think of anything I’m specifically doing wrong, it’s not even getting as far as the alert function.
P.S. Your code works in Firefox
Use http://ip-api.com/json for your location instead, it will work in Chrome no problem.
Blasted Google Chrome!
To get around this problem when using chrome is to set codepen to https and use https://crossorigin.me in front of your open weather map api url. Good luck!