DEV Community

loading...

Discussion on: TypeScript in a Weekend: A Crash Course

Collapse
ouailsalem profile image
Ouail

Thank you so much ♡
Just a question , what's the difference between array and enum?

Collapse
krishnakakade profile image
krishna kakade

The main difference is that an array is a value and an enum is a type. And One main difference we can say that an array is a collection of other values (that is it contains other values, you can iterate through them or access individual ones by index), whereas an enum value is simply one atomic value