#Can't push GET data to HTML
8 messages · Page 1 of 1 (latest)
See #faq to learn how to properly share code on Discord: #faq message
#faq has good resources to learn js.
There are a number of things wrong or just bad practices. But the root issues are you're attempting to access data outside the scope of your event listener callback function when you instantiated it. So it's undefined. In addition it's asynchronously being fetched and you're trying to access it outside of your .then callback (stop using these, async/await ftw).
Also don't use innerHTML, textContent is all you need.