Skip to content
This repository was archived by the owner on Sep 12, 2022. It is now read-only.

Commit 303b79f

Browse files
author
Zach Bagnall
committed
underscores for private properties only
1 parent 60575d6 commit 303b79f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,12 +1162,14 @@
11621162
});
11631163
```
11641164

1165-
- Use a leading underscore `_` when naming private properties.
1165+
- Use a leading underscore `_` when naming private properties (not local vars).
11661166

11671167
```javascript
11681168
// bad
11691169
this.__firstName__ = 'Panda';
11701170
this.firstName_ = 'Panda';
1171+
function foo() {
1172+
var _fullName = '';
11711173
11721174
// good
11731175
this._firstName = 'Panda';

0 commit comments

Comments
 (0)