As you progress through this class, you will find yourself having to fix problems in your code. Whether the code simply won't run or is giving you the wrong answer, fixing problems with code is a vital part of being a programmer. The process of working through issues in code is called debugging. We will cover debugging in depth in a later chapter, but here is what we need to know now.
Before asking for help, make sure that you have the answers to some of the questions that may be asked of you and that your questions to the person who is helping you are detailed.
"My code doesn't work" or "Why doesn't my code work?" are difficult questions for someone to answer.
"I tried using console.log()
like the chapter outlined, but the screen says 'Invalid Input'. What does that mean and how might I go about addressing it?" is a good question to ask.
Here are some tips on what information you might need when asking for help:
When trying to fix an error in code, many people start by following the exact same steps to see if they get the same results. The more information you can give the person who is helping you, the easier it will be for them to help you.
Note
These tips also apply to whenever you encounter a technical issue. Having screenshots and a recorded set of steps that you took before encountering the issue can help tech support figure out how to correct the problem and assist you!