Tag: loops

c# – How to enumerate an enum

The Question : 3895 people think this question is useful How can you enumerate an enum in C#? E.g. the following code does not compile: And it gives the following compile-time error: ‘Suit’ is a ‘type’ but is used like a ‘variable’ It fails on the Suit keyword, the second one. The Question Comments :

For-each over an array in JavaScript

The Question : 4853 people think this question is useful How can I loop through all the entries in an array using JavaScript? I thought it was something like this: Where theArray is my array, but this seems to be incorrect. The Question Comments : answers to this question are discussed at meta The Answer