Fake divisor sum polyglots
JavaScript (ES6), V8 / SpiderMonkey vs Chakra, 66 63 bytes

n=&gt;[...Array(n)].map((_,d)=&gt;s+=n%d?0:d,[0,n&gt;10].sort(x=&gt;s=x))|s


Demo



let f =

n=&gt;[...Array(n)].map((_,d)=&gt;s+=n%d?0:d,[0,n&gt;10].sort(x=&gt;s=x))|s

console.log(JSON.stringify(
  [...Array(20)].map((_, n) =&gt; n + 1).map(f)
))




Output

Output of the above snippet on Chrome and Firefox (all correct):

[0,1,1,3,1,6,1,7,4,8,1,16,1,10,9,15,1,21,1,22]


Output on Edge (off by 1, starting at n = 11):

[0,1,1,3,1,6,1,7,4,8,2,17,2,11,10,16,2,22,2,23]


Why?

No algorithm is imposed by the specification for the .sort() method. It's not even required to be stable. Therefore, each JavaScript engine uses its very own implementation.

However, [0,1].sort(x=&gt;x) gives [0,1] with all engines.

So what's the difference?

What's happening here is that Chakra is passing 1 as the first parameter of the first (and only) iteration to the callback function (asking for a comparison of 1 with 0), while V8 and SpiderMonkey are passing 0 (asking for a comparison of 0 with 1).

You can use the following snippet to check what your browser is doing.



[0, 1].sort((x, y) =&gt; console.log("Let's compare " + x + " with " + y + "!"))