If you still cannot find the bug in your code after using the strategies outlined in this chapter, do not hesitate to reach out to other programmers.
Whether you are asking your teaching assistant, another student, or a stranger in an online forum, you should first be able to answer the 3 questions outlined below.
Not only will these questions help others assist you more directly, but they may just lead you to the answer yourself!
Describe the error you are experiencing with as much detail as possible.
Bad: "My program is broken."
Bad: "I'm getting this error."
Good: "There is a ReferenceError on line 23, but it's not clear to me what's causing it."
Another programmer can glean a lot of information by hearing what you have already tried.
Bad: Asking for help immediately.
Bad: Using trial and error without any specific direction.
Good: "I added user input validation, but I am still seeing the problem."
Bad: "I haven't looked online at all."
Bad: "I Googled 'js range error' and didn't see anything."
Good: "I Googled 'js range error boolean expression' and found a question on Stack Overflow that seemed relevant. I tried the recommended solution, but it didn't fix my problem."