From ed32e1586bf3edc8fd188af4d433069fb05fca65 Mon Sep 17 00:00:00 2001 From: Avril Date: Sat, 12 Feb 2022 15:54:39 +0000 Subject: [PATCH] Changed `exmaple()` to `console.log()` instead of `alert()`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for async-timeout-js's current commit: Future blessing − 末吉 --- asynctimeout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asynctimeout.js b/asynctimeout.js index 6cc469b..d5b5876 100644 --- a/asynctimeout.js +++ b/asynctimeout.js @@ -37,10 +37,10 @@ const example = async (_timeout) => { _timeout = _timeout || 100; // Wait 100 then alert "hi" - alert(await (new AsyncTimeout(() => "hi", _timeout)).timeout()); + console.log(await (new AsyncTimeout(() => "hi", _timeout)).timeout()); // Continuously wait 100 then alert "hi" - for await (const value of new AsyncTimeout(() => "hi forever", _timeout).interval()) { alert(value); } + for await (const value of new AsyncTimeout(() => "hi forever", _timeout).interval()) { console.log(value); } }; //(async () => { example() })();