I've tested my JavaScript in several browsers and it all works fine. However when I run it through JSLint, there are a few (minor) errors it picks up.
If the code works, is it important to fix these?
I've tested my JavaScript in several browsers and it all works fine. However when I run it through JSLint, there are a few (minor) errors it picks up.
If the code works, is it important to fix these?
I'd say yes. If JSLint is telling you something is wrong, best to act on it.
Personally, knowing there were errors would nag me. I wouldn't be deterred by the fact that the code "works". I couldn't be certain that these "minor" errors - your judgment - would not cause a problem in the future.
If the code works, then they probably aren't errors. JSLint is a Lint, not a validator and a very large part of what it does is enforce Douglas Crockford's ideas about best practices.
That said, they are mostly pretty good best practices, and following them is usually a good idea.