Is the underscore prefix in JavaScript only a convention, like for example in Python private class methods are?
From the 2.7 Python documentation:
JavaScript actually does support encapsulation, through a method that involves hiding members in closures (Crockford). That said, it's sometimes cumbersome, and the underscore convention is a pretty good convention to use for things that are sort of private, but that you don't actually need to hide.