Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
  • Loading branch information
ioannad and ptomato committed Aug 14, 2024
1 parent 17922e0 commit 55f5e11
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,7 @@ for (let ctor of ctors) {
// toLocaleString separator is implementation dependent.
function listToString(list) {
const comma = ['',''].toLocaleString();
const len = list.length;
let result = '';
if (len > 1) {
for (let i=0; i < len - 1 ; i++) {
result += list[i] + comma;
}
}
if (len > 0) {
result += list[len-1];
}
return result;
return list.join(comma);
}

// Write some data into the array.
Expand Down

0 comments on commit 55f5e11

Please sign in to comment.