Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
YukaUU committed Jul 15, 2024
1 parent 9b9f79e commit ced2289
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/viewer/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -1634,10 +1634,10 @@ function roundToSecondDecimalPlace(num) {
}

function countOccurrences(arr) {
// カウント用のオブジェクトを作成
// Create objects for counting
let countMap = {};

// 配列内の各要素をカウント
// Count each element in the array
arr.forEach(function(value) {
if (countMap[value] === undefined) {
countMap[value] = 1;
Expand All @@ -1646,7 +1646,7 @@ function countOccurrences(arr) {
}
});

// 結果を2次元配列に変換
// Convert the result to a 2-dimensional array
let result = [];
for (let key in countMap) {
if (countMap.hasOwnProperty(key)) {
Expand Down

0 comments on commit ced2289

Please sign in to comment.