Skip to content

Latest commit

 

History

History
151 lines (126 loc) · 6.94 KB

README.md

File metadata and controls

151 lines (126 loc) · 6.94 KB

Setup

First, fork this repository.

# download your code locally
git clone https://github.com/GITHUB_LOGIN/js-training.git

# change working directory to the newly cloned repository
cd js-training

Testing

Once you have coded your masterpiece, you can start to test your solutions.

You may either use our test tool to check all files

# run the test runner
./tester

output-tester

Or you can test files one by one with node

# open a file in node
node exercises/primitive

output-node

our tester may include bugs, feel free to check the code and fix it

(in doubt use node)

Solving

You can start editing the javascript files with your favorite text editor.

# Sublime Text
subl primitive.js

# VSCode
code primitive.js

# Vim
vim primitive.js

# I can not be held responsable if you use anything else.

where-to-code

Get Help !

We maintain an example based code documentation

All you need to know to solve those exercises is described in them.

And we also made you a currated list of all the most usefull methods :

(*) methods in italics are NOT pure (using them with the same arguments won't return the same result). They must be used with caution as it is harder to predict their results

Update

We may update tests, to apply them fetch and merge the master branch back to your branch.

git merge pull push branch checkout origin master stash pop

Test Style

We recommand to use editorconfig to auto-config your editor to match the coding style

We also made an .eslint rule to help you formating your code.

You may want to use eslint and prettier-eslint for painless application of the style

Contribute

We greatly recommand you to add your own tests to this list

  • add your test file (ex: exercises/my-test.js)
  • edit package.json and add "my-test" to the "tests" array
  • make a pull request ! https://github.com/nan-academy/js-training/compare/master...GITHUB_LOGIN:master

All the tests must be written using assert for ./tester to work properly.