hackerrank fizzbuzz javascript
for (i=1; i<=100; i++) {
console.log((i%3==0&&i%5==0)?"FizzBuzz":(i%3==0)?"Fizz" : (i%5==0)?"Buzz" : i);
}
hackerrank fizzbuzz javascript
for (i=1; i<=100; i++) {
console.log((i%3==0&&i%5==0)?"FizzBuzz":(i%3==0)?"Fizz" : (i%5==0)?"Buzz" : i);
}
hackerrank.com fizzbuzz javascript
function fizzBuzz(n) {
// Write your code here
for(let i = 1; i <= n; i++) {
if(i % 3 == 0 && i % 5 == 0) {
console.log('FizzBuzz')
}
else if(i % 3 == 0) {
console.log('Fizz')
} else if(i % 5 == 0) {
console.log('Buzz')
} else {
console.log(i)
}
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us