Solving errors/bugs is the daily work of a developer. No one does perfect coding. Beginners often get nervous when they get errors, sometimes they give up.
Here I have tried to share some steps on how I usually solve any error or bug.
First of all, I read the error message very carefully. I try to understand the meaning of the error message. Recheck my syntax, logic and console log some code to see if I'm getting the expected output or not!
Then, I search on google about this error and observe the google result.
Most of the time, I follow the StackOverflow and GitHub results and see how other developers got this kind of error and solved it.
I also read the official documentation about a related topic to get enough knowledge.
Most of the time when I feel overwhelmed, I take a break and try to refresh my mind. Then I start again.
When I feel stuck and not getting any rays of light, I contact some senior developers and discuss with them.
Nowadays, there are so many Facebook groups and communities. Sometimes, I share my problem with this kind of group and got so many positive responses.
Most of the time you will see your bug or problem was very silly and you will feel dump. That's okay. Everyone feels the same. Don't forget to take a break and feel free to ask for help when you will feel stuck.
Setting on a chair all day long and thinking about solutions and trying to come up with something is exciting but when you got nothing after all this effort and shutdown your PC with a sigh is tedious. Don't give up. Take your time. This is a part of the journey. Best of luck.
Happy Coding~♥