<!DOCTYPE html>
<html lang="en">
<body>
<script>
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
const annoncement = async () => {
document.body.insertAdjacentHTML("afterBegin"
, `<h1 id="info">date: ${new Date().toLocaleDateString()}</h1>`);
await sleep(3000)
document.querySelector("#info").remove();
}
annoncement();
</script>
</body>
</html>