Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
JensArvid committed Feb 16, 2024
1 parent 164ec37 commit 98f482a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 40 deletions.
81 changes: 42 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion src/fizzbuzz.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
const answer = []

// Write your code below this line

for (let i = 1; i<=15; i++){
if (i % 5 === 0 && i % 3 ===0){
answer.push('FizzBuzz')
} else if (i % 5 === 0){
answer.push('Buzz')
}else if (i % 3 === 0){
answer.push('Fizz')
} else {
answer.push(i)
}
}




// Don't touch the code below this line, we'll cover it later
module.exports = answer

0 comments on commit 98f482a

Please sign in to comment.