3 ms·
Iterating over objects and arrays: frequent errors (2017)
- deleted 7y ago[deleted]
- leovander 7y agoSo what were the errors? All I caught was the index thing at the end, but I would think it would be more about going out of bounds since the topic is iterating over objects and arrays. I also thought that looping over object keys using for in, although it does work you should also be checking to see if it object has it as its own property that you declared, or is that overkill in checking keys?
- jwilk 7y ago> So what were the errors? There's a syntax error in the "Alter nested property values" section, but I doubt that's what the author had in mind. :-P
- AtlasBarfed 7y agoThere used to be a flood of pretty basic programming blog entries written by ESL programmers in lots of the programming feeds. They almost seemed like homework assignments or flawed attempts to gain industry "cred" as an expert. The article purporting to be somewhat language agnostic, doesn't even address 0 vs 1 for initial index, or do examples of reverse iteration, simultaneous iteration, or other really complicated iterations. But the breakfast pictures were pretty good.
- mratsim 7y ago> The example code is JavaScript And then introduce `==` and `===`. Yep, I usually don't like the articles with clickbaity item lists like "10 ways you are iterating wrong over an array" but somehow I would like to see that here.
- jwilk 7y agoWhat's ESL?
- AtlasBarfed 7y agoEnglish as a Second Language. ... It was largely people that appeared to be from India, which played into the impression/bias that Indian schools are memorize and regurgitate. But again there is a lot of bias in that opinion.
- deleted 7y ago[deleted]