Everyone makes mistakes. Especially when programming. Especially when you learn. Actually when learning to program, it is important to make mistakes, try to break the program and see what happens. Do it. It will make you understand what is going under the hood much better.
One of the best advice I can give to other beginner programmers – learn to use the debugger as quickly as possible. Don’t be afraid to make mistakes. Actually make them on purpose. And examine what the debugger is telling you. It will make you understand the computer much better.