JSLint reports "Unexpected dangling" character in an underscore prefixed variable name

Posted by Zhami on Stack Overflow See other posts from Stack Overflow or by Zhami
Published on 2010-06-14T17:55:04Z Indexed on 2010/06/14 18:02 UTC
Read the original article Hit count: 640

Filed under:
|

I know that some people consider the presence of a leading underscore to imply that a variable is "private," that such privacy is a fiction, and assume this is why JSLint reports such names with an error message.

I use Google Analytics on a Web site I am building. I make reference to GA's variables, such as "_gaq."

I am trying to get my JS code to be 100% JSLint clean (I'm not religious about my coding style, and so will go with Mr. Crockford's counsel). That said, I can't do anything about Google's variables names... so, I guess I can't get 100% "clean."

I post here in case I've misunderstood the message, and can do something to comply with JSLint practices.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jslint