Practice regular expressions in JavaScript
- Install Node.js if you haven't previously, using the official installers for your OS, or the package manager of your choice (Homebrew, apt, etc). If you don't know if you have Node.js,
node --version
will tell you. - Fork and clone this repository.
- Run
npm install
from the project directory.
- Pick an exercise to work on. Each exercise consists of two files of the form
exercise.js
andspec/exercise.spec.js
. You will code in the first of these, and use the second to understand the requirements of the exercise. - Run the tests:
npm test spec/exercise.spec.js
- One test will fail. Fix that.
- When the first test passes, rename the second test from
xit
toit
(to make it visible to the test runner, Jasmine). - Repeat steps 2 through 4 until all tests pass.
If you would like to contribute an exercise, create a pull request to the solution
branch including new files for both the spec and solution, using the naming scheme referenced above.