Skip to content

Alaka-K/fizzBuzz_JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fizzBuzz_JS

Exercise Write a fizzBuzz function in JavaScript. As a reminder, this function should take a number as argument, and then either:

Return "Fizz" if this number is divisible by 3. Return "Buzz" if this number is divisible by 5. Return "FizzBuzz" if this number is divisible by both 5 and 3. Otherwise, Return the number itself.

  • Initialise a new project directory with a package.json file and install Jest.
  • In a file fizzbuzz.test.js, Write one test case for each acceptance criteria above, - using one it block for each, and matchers to test the function's return value.
  • Write the fizzBuzz function in the file fizzbuzz.js to the four tests pass.

About

fizzBuzz function in javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published