Awesome Open Source
Awesome Open Source

JavaScript Exercises

Collection of JavaScript Exercises and Coding Challenges

Stars Last Commit

Series of interesting JavaScript exercises that I solved during my education. For each exercise I've tried to include several possible solutions. Thanks to Jest test framework you can easily check the correctness of your solution.

Table of Contents


Clone the repo.

$ git clone

Install Jest globally.

$ npm install -g jest


Each exercise directory contains index.js file with exercise contents and test.js file with tests validating solution correctness.

Running All Tests

$ jest

Running Tests for Specific Exercise

To run test for specific exercise simply add its directory path to jest command, e.g.

$ jest exercises/ReverseString

You can also run Jest in watch mode by adding --watch flag.



All contributions and suggestions are welcome! For suggested improvements, please create an issue. For direct contributions, please fork the repository, create your feature branch, commit your changes, push commits to the branch and create a new pull request.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (67,507
functional-programming (458
learning (334
learn-to-code (85
learn (67
learning-by-doing (52
exercises (36
exercise (27
challenges (24
coding-challenge (21
coding-challenges (14

Find Open Source By Browsing 7,000 Topics Across 59 Categories