Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
常に6つの数字の同じフレームに数字を配置したい
つまり、7〜13の番号を使用する場合は、6にフロアします。14〜20の番号を使用する場合は、13、21〜27〜20などにフロアします。可能性はあります。これを行うにはfloor()
floor()
function weirdFloor(n) { return Math.floor(n / 7) * 7 - 1; }