Added output for other numbers with no FizzBuzz

This commit is contained in:
NetMan 2024-01-02 19:47:32 +01:00
parent 2b5af4b484
commit 96aa5cd590
1 changed files with 1 additions and 0 deletions

View File

@ -7,6 +7,7 @@ if (isNaN(number)) {
output = ""; output = "";
if (i % 3 === 0) (output += "Fizz"); if (i % 3 === 0) (output += "Fizz");
if (i % 5 === 0) (output += "Buzz"); if (i % 5 === 0) (output += "Buzz");
if (!output) (output = i.toString());
console.log(output); console.log(output);
} }
} }