function alert(text) {
let divAlert = document.createElement("div");
divAlert.className = "my_alert";
divAlert.innerHTML = `Потдвердите действие:<br>${text}<br><button id="yes">OK</button>`;
document.body.appendChild(divAlert);
document.querySelector("#yes").onclick = () => {
divAlert.remove();
}
}
alert("hello");
alert = (...args) => {
console.log(...args[0]);
}