/practice-problems

Practice problems for a young JavaScript Padawan.

Primary LanguageJavaScript

Practice problems

Welcome to practice problems. I'll update this repository every morning with a new code challenge.

Using this Repository

You'll find each day's toy problem in its own folder.

ES2015+ support

Spectator supports ES2015+ by transpiling files with Babel. Any JavaScript feature included in the latest preset can be used in a toy problem. The tradeoff for this support is that error messages can sometimes be a bit more obscure and/or line numbers in the stack trace don't map precisely to their original line numbers.

If this is not an acceptable tradeoff, you can write only ES5 code create a spectator.json file in the root of the problem directory that looks like this:

{
  "babel": false
}

Submitting your Solutions

VERY IMPORTANT: Before submitting your solutions, find and fix all syntax errors

Solutions are submitted via Pull Request. Follow these steps:

  1. From your fork, select Pull Requests and then create a New pull request.
  2. STOP. Before you Click to create a pull request for this comparison you must adjust the target branch (aka base branch) to be your username.
  3. Click Send pull request

Resolving Spectator's Unmergeable Pull Request

You may encounter a scenario where Spectator will not merge your pull request. This often happens as a result of your upstream branch becoming out of sync with your local copy. To resolve this problem, run:

git pull upstream <your-branch-name>

Resolve any conflicts, merge, commit and push. You will then be able to submit a Pull Request that will get correctly merged.