Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtfoley/fibonacci-exercise
Exercise with Fibonacci Sequence
https://github.com/mtfoley/fibonacci-exercise
Last synced: 13 days ago
JSON representation
Exercise with Fibonacci Sequence
- Host: GitHub
- URL: https://github.com/mtfoley/fibonacci-exercise
- Owner: mtfoley
- License: mit
- Created: 2021-12-14T13:09:31.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-16T19:40:41.000Z (about 3 years ago)
- Last Synced: 2024-10-26T06:54:14.082Z (2 months ago)
- Language: JavaScript
- Size: 855 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fibonacci-exercise
## Deployed to Netlify
This application has been deployed to Netlify: https://mtfoley-fibonacci.netlify.app/
## Coding Exercise with Fibonacci Sequence
- The objective is to display up to 50 Fibonacci numbers. When the page initially loads it should show the first 50 such numbers.
- There should be checkboxes to enable and disable three filters. These filters allow you to omit some numbers
from the result. Omitted numbers are not counted in the total; you should keep generating numbers until
you have 50 of them that pass the filter.
- One filter keeps only even numbers in the result
- One filter keeps only prime numbers in the result
- One filter keeps only numbers with at least one odd digit
- When multiple filters are selected, they should be treated as an AND filter; a number has to pass
all of the filters to be included in the result.
- It is expected that you will not have 50 results for all possible combinations of filter settings. You can stop
searching once your candidate number reaches Number.MAX_SAFE_INTEGER (9,007,199,254,740,991)
- The three filters should start off all unchecked. The table of results should be filled when the page loads.
- It needs to have the three headers shown (Some title of your choosing, "Filtering Options", and "Results")
- Results should be displayed in a single properly structured table.
- Checking or unchecking any of the filters should recalculate the results in the table.## Use of ES Modules
This project uses ES Modules, in the form of .mjs files.
## Development Setup
In order to develop on this application, it's recommended to use node / npm. You can follow these steps for setup.
1. Clone this repository, e.g. `git clone https://github.com/mtfoley/fibonacci-exercise`
2. Change directory, e.g. `cd fibonacci-exercise`
3. Install development dependencies by running `npm install`
For the test suite, run `npm test`.
This application only has static files. To serve the files locally you can run `npm run serve`, and open a web browser for `http://localhost:3000`.