I don’t understand what’s wrong with my code.
It looks like ‘api’ variable doesn’t work.
Could you help me?
If you look at your browser’s console (Ctrl+Shft+J in Chrome), you will see you are trying to request an api which starts with http. The problem is, since Codpen is served over https, the browser requires the requested url also be served over https. You are in luck, because it just so happens, that openweather.org has an https version you can use. All you have to do is add an s on the end of http and you are good to go.
Thanks a lot! It finally works.