Reference Error
An error due to the presence of undefined word(s) in the codes.
Example 1
| Error Message |
|
|---|---|
| Bug example ✘ | Source of error: a typographical error
|
| Correction ✔ | Solution: replace the typo with the correct spelling
|
Example 2
| Error Message |
|
|---|---|
| Bug example ✘ | Source of error: items created in a For loop cannot be referenced outside of the loop.
|
| Correction ✔ | Solution: define the items outside of the For loop by adding them into an external list.
|