I need to create an array from all of the values in an emum. This seems to work:
enum Foo {
one = 'one',
two = 'two',
three = 'three',
}
console.log(Object.values(Foo));
However will the order always be one
, two
, three
? It seems to be this way when I test but as Foo
is an object in JavaScript I don't know if this can be relied upon?