Like learning a musical instrument, programming requires daily practise.
The exercises are split into two folders: mandatory
and extra
. All homework in the mandatory
section must be completed for homework by the following class. The extra
folder contains exercises that you can complete to challenge yourself, but are not required for the following class.
For your homework, we'll be using test driven development to check your answers. Test driven development (or TDD) is the practice of writing tests for your code first, and then write your code to pass those tests. This is a very useful way of writing good quality code and is used in a lot of industries. You don't have to worry about knowing how this works, but if you're curious, engage with a volunteer to find out more! :)
- Complete the challenges in each file and save it once you're happy with your changes
- Run the script to check the results against the tests - all tests should read PASSED if you completed the challenges correctly. If a test reads FAILED, find the associated test to identify which function failed and fix it.
- Raise a PR once you're happy with the quality of your code.
- You can find out how to do this here
To challenge yourself even further, you can get ahead for next week's class by reading some of the below documentation:
- Loops in JS: https://javascript.info/while-for
- Switch statements: https://javascript.info/switch
- Comparisons in JS: https://javascript.info/comparison
- Logical operators in JS: https://javascript.info/logical-operators
- More on operators: https://javascript.info/operators