不知道怎样遍历这个数组用for循环和数组遍历
let selfsstudyCount = 0, restCount = 0;for (let i = 1; i <= 30; i++) {if (i % 6 == 0) restCount += 1else if (i % 3 == 0) selfsstudyCount += 1}console.log(selfsstudyCount, restCount)