Need help with getting button id to work


How to make button id work?
Repl link:

code snippet
```<button id="abutton"></button>

Welcome to the community, @TheTechnicalBirb!

One thing I noticed in your code is that you used var. This is OK but it’s better to use let in most cases.
When you make a variable that isn’t going to change, for example the button, you should use const.


I think you should be seting the iframe’s href, not src, you should double check that. Also I think you should just set it to window.location.href, not whatever your doing with URLObject at the top.