Hi there, I am facing a weird problem with my codes. While trying to learn responsive web design using JS, I wrote this code on vs code running live server.
On live server, everything works fine when I placed the script link in body tag but when I copy the same script src link in head tag, it doesn’t run. What could be the possible reason for this?