Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 998 Bytes

readme.md

File metadata and controls

29 lines (19 loc) · 998 Bytes

A set of JavaScript challenges

Here's a set of small vanilla JavaScript challenges. You have to write the code in the challenge functions, to transform the input data before returning it.

  • The challenges are located inside the /challenges folder.
  • /data contains a JSON file that's used for one of the challenges.
  • /test contains the unit tests (written in Vitest), that validates the challenge have been solved correctly. It might help to look at these tests if you are unsure of the expected output from the challenge functions.

To get started, you should run:

npm install

Validate the code

You can validate the result by running the tests.

npm test

This will validate all the tests - If you just want to validate a specific challenge, include the name of it when running the test. E.g.

npm test challenge-01

When you run the test, it will run in watch mode, so it continues to validate the code when you change it.