From e92c24e7df4886a6ebf0b34bbb3f9be1eb176b59 Mon Sep 17 00:00:00 2001 From: Ulyana Date: Tue, 26 Sep 2023 09:16:36 +0300 Subject: [PATCH] added timer --- main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 06c89a9..6c1f008 100644 --- a/main.js +++ b/main.js @@ -7,8 +7,12 @@ title_2.style.color = "#E75480"; var body = document.getElementById('body'); body.style.backgroundColor = "#FFC0CB"; -var whattheysaid = confirm("Красиво?"); -console.log(whattheysaid); +setTimeout(whattheysaid, 5000); + +function whattheysaid() { + confirm("Красиво?"); + console.log(whattheysaid); +} var counter_button = 0;