From 7f67c9ee95b7cc9f49573811e00223f95783dd63 Mon Sep 17 00:00:00 2001 From: NetMan <13informatyka14@gmail.com> Date: Tue, 2 Jan 2024 19:46:04 +0100 Subject: [PATCH] Added check for number prompt --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index e69de29..4fdbc9a 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,7 @@ +let number = parseInt(prompt('FizzBuzz: Input a total number')); +if (isNaN(number)) { + alert("Not a number, refreshing"); + location.reload(); +} else { + +} \ No newline at end of file