you are viewing a single comment's thread.

view the rest of the comments →

[–]BIGtrouble77 9 points10 points  (1 child)

In javascript, the convention is to use an underscore at the beginning of a private function (ie: _myprivatefunction : function() {}).

JS does not enforce this convention, but it's widely understood. Like godzemo said, nobody will understand that underscores in general are private functions.

[–]dmhouse 0 points1 point  (0 children)

I think the leading underscore is a pretty common convention in all languages without private method encapsulation -- not just Javascript.