What do the errors in my Skillcrush editor mean?
Our Skillcrush text editor will highlight any lines where it spots problems with either a red X or yellow exclamation point. It's called linting. What's linting, you ask? It's how developers check their code for potential errors as they're still writing it!
Types of errors
As you write your code, you'll see suggestions pop up, with either a red circle with an X and a description like this:
Or, a yellow triangle with an exclamation point and a description:
The red circle alerts you to an important error that will most likely break your code in some way.
The yellow triangle tells you that your code will still work, but that you're missing something that's a best practice to include.
One thing to keep in mind is the error might not in fact exist on the same line where the message is displayed; the issue could come before it. Code is read from top to bottom, so an error earlier in the code means that elements that follow may not work. Use the error notices as a starting place and work backward from there.
Don't panic if you see errors in your editor before you've finished writing your code! Our friendly linter is pretty industrious and it can't tell if you're done or not. Let yourself experiment with what you think is right, and then fix any errors that are still present when you've finished.
While linting is super helpful to spot syntax errors and other best practice no-nos, it won't help you with your code logic or what it is that you are aiming to accomplish. Remember to look at your code with the bigger picture in mind. Not getting any errors is HUGE and definitely a win - but in the end, does the code DO what you want it to do?
And remember, if there's an error that you can't quite figure out, or your code just isn't behaving the way you want it to, we're here to help!