Javascript: Round number to nearest multiple

Published:
const roundToNearest = (i, n) => (i % n > n / 2 ? i + n - (i % n) : i - (i % n))