putting the last console log inside the callback of addEventlistener, it means your console log would be inside the addEventlinstener but after the if statement
make the code that uses callback addEventListene a separate async method, simply use await on that method.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There are two ways you can achieve this
putting the last console log inside the callback of addEventlistener, it means your console log would be inside the addEventlinstener but after the if statement
make the code that uses callback addEventListene a separate async method, simply use await on that method.