I am looking to iterate through an enum in order to retrieve all the values. Let's say I have
export enum Colours{
green,
red,
blue,
brown,
purple,
black,
orange,
pink,
yellow
}
and what I aim to achieve is
array.foreach(item => {
item.colour = Colours.value
});
Therefore, the first item in the array would be green, and so on. Is there a more effective method for accomplishing this?