Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.38 KB

File metadata and controls

35 lines (25 loc) · 1.38 KB

FIZZBUZZ

Learn to translate Ruby's FizzBuzz into JavaScript, Jasmine, HTML, JSON whilst debugging and applying TDD.

Now that we're set up with Jasmine, we can start writing code.

In this challenge, you will test-drive FizzBuzz in JavaScript, using Jasmine.

Challenge Setup

In case you've forgotten the rules of FizzBuzz:

  • Print the numbers from 1 to 100
  • If a number is divisible by 3 print "Fizz" instead
  • If a number is divisible by 5 print "Buzz" instead
  • If a number is divisible by 3 and 5 print "FizzBuzz" instead

Learning Objectives covered

  • Use Jasmine to Test-Drive Development (TDD)

Tips

  • Remember to reload the browser after any changes have been committed
  • Open Console log: Mac users 'Option' + 'command' + 'i' Open Console log: Window users: 'Option' + 'command' + 'j'

To complete this challenge, you will need to:

  • Write FizzBuzz in JavaScript, fully test-driven
  • Refactor the code so it's clean.

Resources