Introduction
Assertions help check if your code works as expected by testing values during development. They stop the program if something is wrong, so you can fix it early.
When you want to check if two values are exactly the same in a test.
When you want to verify a condition is true before continuing.
When writing tests to catch mistakes in your code automatically.