This time we've decided to give you the exciting challenge of writing your own tests. This is a really important skill to practice as generally in industry you will be writing your own tests to ensure code works as expected.
Tests also serve as great documentation to other developers about how your code should behave and the intention of your code. 📝
First, watch the following video:
Then, work through the exercises in a TDD (Test Driven Development) approach of Red -> Green -> Refactor.
2
, 3
and 4
for isPrime
can you be sure that your function is actually correct?
You've nearly finished these exercises now. 🔥 For the final ones see: Exercises 007 - Docs