What it does
Clone the repository to your local machine, install the dependencies, and fill your brain with knowledge!
git clone https://github.com/XifeiNi/jslings.git cd jslings yarn yarn jslings watch
Completing the Exercises
All exercises can be found in
jslings/exercises/<concept>. For every topic we have multiple exercises for you to learn from basic to advanced.
Each exercises comes with some tests (
jslings/src/__tests__/ for the curious). The CLI tool runs those tests to make sure your code does what it's supposed to. To start learning, simply run:
yarn jslings watch
From there, you'll see our command line interface. You can press
c to test your code and update your progress as you move along!
We've includes some hints for each exercises. Once you've started the
jslings CLI, you can simply press
h to receive a hint for the exercise you're currently on. Pressing
h multiple times will cycle through the hints we have provided.
We welcome PRs to improve
The current code base allows you to add tests using
yarn generate, this creates exercise as well as test files. To add your tests into
jslings, all you have to do is -
- Create a function(with appropriate inputs) and export it from the js file
- Write a test for the function in the
- Fire up your custom
P.S. If you'd like to see your tests added into
jslings, feel free to submit PRs and label them as
Before submitting the PRs for CLI and other things not related to tests, please label them as
How We built it
We built it using Ink (a tool for building CLI UIs with React) and Jest. Jest makes running tests easy, allowing us to check how the learners are doing as they progress through the curriculum.