Would this line be added into here.
document.body.style.backgroundColor = "green";
(function iife() {
"use strict";
function show(el) {
el.classList.remove("hide");
}
function hide(el) {
el.classList.add("hide");
}
function coverClickHandler(evt) {
const cover = evt.currentTarget;
const thewrap = cover.parentNode.querySelector(".container");
document.body.style.backgroundColor = "green";
hide(cover);
show(thewrap);
}
const cover = document.querySelector(".jacketa");
cover.addEventListener("click", coverClickHandler);
}());
Or would it be better to keep them separate?
(function iife() {
"use strict";
function backClickHandler(evt) {
document.body.style.backgroundColor = "green";
}
const back = document.querySelector(".jacketa");
back.addEventListener("click", backClickHandler);
}());