Skip to content

Commit

Permalink
Naming convention: Grammar.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz committed Jan 29, 2012
1 parent a8789f7 commit 75a7fa5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Expand Up @@ -506,8 +506,8 @@ 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 naming
constants as uppercase camel.
letters. This is a throwback of the general Python and Ruby practice of having
constant names start with uppercase letters.
``` javascript
// Classes:
Expand All @@ -521,15 +521,14 @@ myAlbum
```
For names with multiple words, JavaScript often calls for CamelCase. Using
underscores are often discouraged, considering most JavaScript libraries already
use CamelCase.
underscores are discouraged in JavaScript.
``` javascript
// Good:
// Good (CamelCase):
PhotoAlbum
albumCover
// Avoid:
// Avoid (under_scores):
photo_album
album_cover
```
Expand Down

0 comments on commit 75a7fa5

Please sign in to comment.