Skip to content

Commit 6e4859d

Browse files
vsemozhetbytljharb
authored andcommitted
[guide] remove trailing or leading underscores
1 parent 2313174 commit 6e4859d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,13 +1022,13 @@ Other Style Guides
10221022
}
10231023
inherits(PeekableQueue, Queue);
10241024
PeekableQueue.prototype.peek = function () {
1025-
return this._queue[0];
1025+
return this.queue[0];
10261026
};
10271027

10281028
// good
10291029
class PeekableQueue extends Queue {
10301030
peek() {
1031-
return this._queue[0];
1031+
return this.queue[0];
10321032
}
10331033
}
10341034
```
@@ -1971,7 +1971,7 @@ Other Style Guides
19711971
function getType() {
19721972
console.log('fetching type...');
19731973
// set the default type to 'no type'
1974-
const type = this._type || 'no type';
1974+
const type = this.type || 'no type';
19751975
19761976
return type;
19771977
}
@@ -1981,15 +1981,15 @@ Other Style Guides
19811981
console.log('fetching type...');
19821982
19831983
// set the default type to 'no type'
1984-
const type = this._type || 'no type';
1984+
const type = this.type || 'no type';
19851985
19861986
return type;
19871987
}
19881988
19891989
// also good
19901990
function getType() {
19911991
// set the default type to 'no type'
1992-
const type = this._type || 'no type';
1992+
const type = this.type || 'no type';
19931993
19941994
return type;
19951995
}

0 commit comments

Comments
 (0)