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.
私はjavascriptで丸められた最も近い数を見つけたいです。
10 --> 10
11 --> 10
12 --> 10
13 --> 15
16 --> 15
17 --> 15
18 --> 20
19 --> 20
20 --> 20
var multipleOfFive = Math.round(yourNumber / 5) * 5;