Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 536 Bytes

naming-convention.md

File metadata and controls

29 lines (23 loc) · 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