I am trying to make a test that shows that doing Object.keys(someObj)
results in an undetermined order.
a = {}
a.b = 1
a.c = 2
a.d = 3
Object.keys(a)
// result should be undeterministic because Objects are not ordered
However no matter how I do it, the result is always the ['b', 'c', 'd']
.
How can I get some variance in my result? example ['d', 'c', 'b']