Double event listener for single function With your help in this question,
I've got this code to show the pop-up, and than hide it when close button is clicked:

&lt;script&gt;
    var applycouponPopupId = "popup-wrapper";
    window.addEventListener("load", function() {
        document.getElementById(applycouponPopupId).classList.add("modal-overlay_visible");
    });
    document.addEventListener('click', function(e) {
        if (!e.target.classList.contains("modal-overlay__close")) return;
        document.getElementById(applycouponPopupId).classList.remove("modal-overlay_visible");
    });
&lt;/script&gt;


Now i need to change the code to close the pop-up on any click or scroll.
According to this answer, i converted code to the following:

&lt;script&gt;
    var applycouponPopupId = "popup-wrapper";
    window.addEventListener("load", function() {
        document.getElementById(applycouponPopupId).classList.add("modal-overlay_visible");
    });

    function mouseMoveHandler() {
        document.getElementById(applycouponPopupId).classList.remove("modal-overlay_visible");
    }

    ("click scroll".split(" ")).forEach(function(e) {
        document.addEventListener(e, mouseMoveHandler, false);
    });
&lt;/script&gt;


Please tell if i did everything right.
The only suggestion I have is..

"click scroll".split(" ") ... why? what was that person thinking?

['click', 'scroll'].forEach() is both faster and shorter.

Aside from that, looks great!