Skip to content
generate prime table
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Prime table

Use it

now hosting :

Install the dependencies :

$ npm install
// or
$ yarn

Launch the server :

$ npm run start
// or
$ yarn start

Launch the test :

$ npm test
// or
$ yarn test

To get watch tests : $ npm testdev

You can regenerate a prime table by clicking the small pencil in the top left of the page.

What you’re pleased with ?

The power of the tool i choose when it comes to get a result quickly (nextjs, jest). The generation of prime took some research but was easier than i thought it will be or at least faster to implement than expected.

what you would do with it if you had more time ?

Look for a way to improve the guessing of how much the limit needs to be for the algo. It seems to be quite large and result in a lot more prime than i need based on n.

Probably look at a better interface to present the result. The array is simple and efficient but when you have so many numbers it becomes hard to not get lost, also on a mobile it will probably be not readable in this state. Add some way to only show a range on the array would be a good way to improve readability and presentation on both desktop and mobile.

I would use some loading state also to handle cases like 1000 prime generated with the table (1 000 000 result was a lot for my mac).

You can’t perform that action at this time.