From jquery.ui.autocomplete.js:
_renderMenu: function( ul, items ) {
var self = this;
$.each( items, function( index, item ) {
self._renderItem( ul, item );
});
},
From jquery.ui.autocomplete.js:
_renderMenu: function( ul, items ) {
var self = this;
$.each( items, function( index, item ) {
self._renderItem( ul, item );
});
},
Underscore prefixes in javascript are mostly used to signify "private" functions, properties etc. I.e., functions and properties that are used internally and should not be accessed from outside the library/plugin.
And yes, as nnnnnn says, the important word there is "should", as in:
Usually, people like to use _ to denote the variable/function to be private, but _ has no special meaning in JavaScript.
It doesn't mean anything technically but usually the writer intends it to make it as protected (internal method)
I'm not sure where I heard this, looking for documentation as I write this, but I believe vars that start with underscore are usually denoting a private scope.
For reference looks like it's a C thing that other programmers implemented.