Skip to content

Commit a2341ae

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 fd44d58 commit a2341ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hackerrank/interview_preparation_kit/dynamic_programming/max_array_sum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const bigIntMax = (...args) =>
77
args.reduce((m, e) => (e > m ? e : m), BigInt(0));
88

99
function maxSubsetSum(arr) {
10-
const arrCopy = arr.map((x) => BigInt(x));
10+
const arrCopy = arr.map(BigInt);
1111

1212
if (arrCopy.length === 0) {
1313
return 0;

0 commit comments

Comments
 (0)