Ad
  • Custom User Avatar

    It's a feature, not a bug. Also known as "This behaviour is by design."

    It's called modulo but it's actually the remainder operator, where the sign of the result goes with the sign of the numerator, not of the divider. And it's very clearly documented.

    If you want to call something a bug, in my unhumble opinion the result for String.prototype.match() when no match exists, that's a bug. But not this.