Added output for other numbers with no FizzBuzz
This commit is contained in:
parent
2b5af4b484
commit
96aa5cd590
1
index.js
1
index.js
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue