Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (23 sloc) 536 Bytes

Naming convention

Classes often start in uppercase letters, while instances start with lowercase letters. This is a throwback of the general Python and Ruby practice of having constant names start with uppercase letters.

// Classes:
Photo
Album
Author

// Instances:
photo
myAlbum

For names with multiple words, JavaScript often calls for CamelCase. Using underscores are discouraged in JavaScript.

// Good (CamelCase):
PhotoAlbum
albumCover

// Avoid (under_scores):
photo_album
album_cover