Skip to content

Commit

Permalink
style: 03-arrays-tasks fix eslint & prettier errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-koran committed Dec 10, 2024
1 parent 01abbed commit cfd2a1d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/03-arrays-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function propagateItemsByPositionIndex(arr) {
...acc,
...Array.from({ length: index + 1 }).fill(curr),
],
[]
[],
);
}

Expand Down Expand Up @@ -343,7 +343,7 @@ function sortDigitNamesByNumericOrder(arr) {
};

return [...arr].sort(
(a, b) => digitNamesSpecificity[a] - digitNamesSpecificity[b]
(a, b) => digitNamesSpecificity[a] - digitNamesSpecificity[b],
);
}
/**
Expand Down Expand Up @@ -480,15 +480,14 @@ function sortCitiesArray(arr) {
* [0,0,0,0,1]]
*/
function getIdentityMatrix(n) {
return Array.from({ length: n }).map((_column, columnIndex) =>
Array.from({ length: n }).map((_cell, cellIndex) => {
return Array.from({ length: n })
.map((_column, columnIndex) => Array.from({ length: n }).map((_cell, cellIndex) => {
if (cellIndex === columnIndex) {
return 1;
}

return 0;
})
);
}));
}

/**
Expand Down

0 comments on commit cfd2a1d

Please sign in to comment.