Skip to content

Commit fd44d58

Browse files
author
Gonzalo Diaz
committed
[BUGFIX] SonarQube: Prefer class field declaration over this assignment in constructor for static values.
Class properties should be declared as fields rather than assigned in constructors javascript:S7757
1 parent 09dacd8 commit fd44d58

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/hackerrank/interview_preparation_kit/sort/ctci_bubble_sort.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
const SEPARATOR = '\n';
66

77
class SortableGroup {
8-
group;
8+
count = 0;
99

10-
count;
10+
group;
1111

1212
constructor(group) {
13-
this.count = 0;
1413
this.group = group;
1514
}
1615

0 commit comments

Comments
 (0)