3 ms·
I assumed he meant a for(obj in list), not for(int x = 0; i < foo.... It's pretty natural to forget the first syntax if you haven't used it in a while because
by DavidWoof 15y ago
I assumed he meant a for(obj in list), not for(int x = 0; i < foo....
It's pretty natural to forget the first syntax if you haven't used it in a while because there's no real standard for it across languages.
- trustfundbaby 15y agoActually its the latter ... I do a lot of python, ruby and jquery (almost exclusively), so I really can't even remember the last time I had to do a for loop. I've done, C, C++, C# & Java so the syntax wasn't unfamiliar to me at all, and I probably could have recalled it if I had taken 2 minutes to do it, I just didn't think it would be a big deal to ask so I could get on with the code.