This is the correct behavior; JavaScript, along with the c like languages (c / c++ / java / etc) all share the same behavior with %, treating it as a remainder instead of a true modulus operator.
If I recall correctly, python does have % as modulus not remainder, which I’ll probably have to file a bug on as I’m assuming we don’t handle that in our python implementation (confirmed and filed here)