quick javascript Q
quick javascript Q
Out of context: Reply #1
- Started
- Last post
- 10 Responses
- REINVIGORATE0
You may be looking for something a little more complex but here's my stab at it-
function rounder(n, b)
{
return Math.ceil(n/b)*b;
}
// 160 rounded to the nearest 100th
document.write(rounder(160,100... // 200