Like learning a musical instrument, programming requires daily practice.
There are some tools that will help you to write code. One of these, Prettier, formats your code, making it easier for you and others to read.
Prettier - Code formatter
editor format
editor.formatOnSave
and editor.formatOnPaste
to trueThe files for the mandatory/extra exercises are intended to be run as jest tests.
npm install
once in the terminal to install necessary dependencies.npm test
writer.js
), run "npm test -- --testPathPattern=writer"
(Remember, you can use tab-completion to get files relative to the current directory, so mTab ↹
/1-Tab ↹
will autocomplete get you the test file starting with 1-)For more information about tests, look here:
https://syllabus.codeyourfuture.io/guides/intro-to-tests
For your homework, we'll be using tests to check your answers. The tests will assert that your functions behave in the correct way. A failing test ❌ indicates that a function is not behaving correctly; a passing test ✅ indicates that your function is behaving correctly.