Don't worry about mistakes
It's okay to make mistakes. During a test, your thought process and reasoning are as important as your ability to write correct code. So, if you encounter a mistake or error, take a deep breath, step back, and approach the problem from a different angle.