joshuaabrookuk / JS_Fizz_Buzz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FizzBuzz in JavaScript

Plan:

  1. Create Input/ Output chart

  2. Set-up repo on github and clone

  3. Set-up project files Jasmine, README.md

  4. Follow the RED, GREEN, REFACTOR TTD process

  • Create a failing test

  • Pass the test in the simplist possible way

  • Refactor if necessary

  1. Finish and reflect

  2. Update README

Input Output
1 1
2 2
3 Fizz
4 4
5 Buzz
6 Fizz
10 Buzz
15 FizzBuzz

Use

Clone this repo and navigate to it in your terminal

To print out FizzBuzz 1 to 100...

type 'open SpecRunner.hml' (see all tests passing, beautifull!)
open the Chrome dev tools console with 'option' + '⌘ / command' + 'J'
copy paste the code below and press 'enter'

javabuzz = new JavaBuzz();
for (var i = 1; i <= 100; i++) {
  console.log(javabuzz.game(i));
}

Refelction

Given more time with this project I will

  • [] Get a lint roller over this code
  • [] Refactor this code
  • Make a beatuful README with proper markdown formatting
  • [] Code a fuction that prints FizzBuzz from 1 to x (argument given)

About


Languages

Language:JavaScript 99.8%Language:HTML 0.2%