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.
Clone the repo.
$ git clone https://github.com/appalaszynski/javascript-exercises.git
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.
$ jest
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.
- Reverse String
- Palindrome
- Reverse Integer
- Longest Word
- Is Even
- Max Char
- Anagrams
- FizzBuzz
- Array Chunk
- Capitalize
- Fib
- Matrix Spiral
- Max Char
- Pyramid
- Queue
- Stack
- Queue from Stacks
- Steps
- Vowels
- Weave
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.