4 ms·
Not knowing about a rarely used operator isn't that big of a deal, but the "hard" part of fizzBuzz is trivial in the couple of languages I am proficient in. In
by RyanDagg 7y ago
Not knowing about a rarely used operator isn't that big of a deal, but the "hard" part of fizzBuzz is trivial in the couple of languages I am proficient in.
In JS:
const isEvenlyDivisible = (num, denominator) => Math.floor(num / denominator) === (num / denominator)