Complete this NodeJS application so that it generates a sequence of Fibonacci numbers, and correctly formats a multiplication table of these numbers. Parts of the application are already written, you should complete the tasks and make sure all tests pass.
This application comes with a set of tests. Some tests are passing and others are failing. Your job will be to get the failing tests to pass by writing your algorithm(s) and running the tests until each of the tests is passing.
Here are the algorithms you'll need to implement:
- Generate a sequence of Fibonacci numbers - This should be done in the file:
fibonacci.js
. - Format the multiplication table output to align the numbers evenly, accounting for numbers having different numbers of digits - This should be done in the file
tableFormatter.js
.
(Tip - If you aren't sure what output to expect, look at the tableFormatter.test.js
file.)
- Install NodeJs v11 on your computer.
- If you don't have a GitHub account, create one.
- Take a personal fork of this repository. (Here are instructions on how to do so, in case you haven't done this before.)
- Clone your fork of the repository to your computer, e.g
C:\github\2019-internship-starter
. - Open a terminal in the repository, e.g
C:\github\2019-internship-starter
- Run the command
npm i
to install dependencies
- Open a Command Prompt in the repository, e.g
C:\github\2019-internship-starter
. - Run the command
npm test
to run the tests. - Run the command
npm start -- --number 5
to run the program with an output of 5 numbers.
- Make sure all your changes are saved.
- Commit your changes (i.e. enter
git commit -m "Application complete."
in a Command Prompt). - Push your changes (i.e. enter
git push
in a Command Prompt). - Reply All to the email from Findmypast (to Laurie, Goodwin, and Eilidh). Include the link to your personal fork on GitHub. (For example,
https://github.com/<your-username>/2019-internship-starter
, replacing<your-username>
with your GitHub username.)