Skip to content

Commit 10aa4f7

Browse files
committed
make result an instance variable at Score
1 parent 20b234e commit 10aa4f7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class Scorer {
1010
}
1111

1212
execute() {
13-
let result = 0;
13+
this._result = 0;
1414
let healthLevel = 0;
1515
let highMedicalRiskFlag = false;
1616

@@ -22,12 +22,12 @@ export class Scorer {
2222
let certificationGrade = 'regular';
2323
if (this._scoringGuide.stateWithLowCertification(this._candidate.originState)) {
2424
certificationGrade = 'low';
25-
result -= 5;
25+
this._result -= 5;
2626
}
2727

2828
// lots more code like this
29-
result -= Math.max(healthLevel - 5, 0);
29+
this._result -= Math.max(healthLevel - 5, 0);
3030

31-
return result;
31+
return this._result;
3232
}
3333
}

0 commit comments

Comments
 (0)