JSLint error: Move the invocation into the parens that contain the function
问题 How can i make this code jsLint Happy ? ;(function ( $, window, document, undefined ) { //some code })( jQuery, window, document ); It advises me to write it this way ? Will there be any difference ? What do i do ? (function ( $, window, document, undefined ) { //some code }( jQuery, window, document )); 回答1: I'm copying my answer from the next question in the JSLint stack. Here's why Crockford says that the second way is better. From http://javascript.crockford.com/code.html When a function