I'm not sure whether this is strictly a Firebug question or really a JavaScript question...
In the popdown menu under Firebug's Console tab, I normally keep *Show JavaScript Errors* enabled, and *Show JavaScript Warnings* disabled. Out of curiosity I just turned the *Warnings* on and reloaded a page I'm building. As before, the page shows no errors, but now it shows three warnings (with the exclamation mark in a yellow circle icon). Two of the warnings say something like "TypeError: function foo does not always return a value". I don't understand why that's an issue. Is a function required to always return a value? I never heard that. And why would that be a "type error" anyway? I associate type errors with something like trying to pass a non-number to something that needs a number, etc. The third warning says "SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function". I never heard that either. In this case, I have a long, complex function with various nested functions and other code in logical order. It would be much less clear (to me, not to the computer) if I declared all the functions up top. And what does "immediately within another function" mean anyway? What I also don't understand is that, as I said, these messages only appear when I turn on "Warnings", *not* when I just turn on "Errors"... so why do they have the word *Error* in the message, like "TypeError" or "SyntaxError"? The code runs fine on every browser I've tested it on. Are these warnings -- or errors, or whatever the heck they are -- anything for me to be really concerned about? Thanks, Jonas -- You received this message because you are subscribed to the Google Groups "Firebug" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/firebug. To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/CAJ-Ow5DP64Usrgs-KPr%3DgTJM-awp%3D89CkP%3D%3Dx1BXW5hETDrnGQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
