Since I started using JSLint, I have encountered the common issues of "used before defined" and "is already defined." While I found solutions for some problems, I am currently stuck. Here is a snippet of my code:
var foo;
foo = addEventListener("click", clickHandler, false);
...
function clickHandler() {...};
The code works as it is, but I receive the "used before defined" warning. If I include clickHandler in the "var" statement, it will be undefined when called, requiring me to rearrange my code and place the handler definition in the middle (reducing readability). Is there a way to use clickHandler and still define it after it's been used?