Arduino program 1 push button 2 LED

Well, each programming language has its features (aka pros and cons), so as far as I can see, that line:

for (auto LedPin:LedPins) pinMode(LedPin,OUTPUT);

is equivalent to a "foreach" widely known function (e.g. on C#, Java,...), but the above is the C++ standard, so who knows which comes forst, the ogg or the chicken (the C++ or C#/Java)? :wink:

PS: another thing I didn't know is "auto", I suppose it's like "var" on other languages, meaning "I don't know the data type, please let the compiler decide, acquiring the array element type" ;-)). In this case it isn't necessary, it could be "byte" (or "uint8_t").

foreach (byte LedPin in LedPins)