
Iterating over objects and arrays: frequent errors (2017) - djsumdog
https://victoria.dev/verbose/iterating-over-objects-and-arrays-frequent-errors/
======
AtlasBarfed
There 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.

~~~
jwilk
What's ESL?

~~~
AtlasBarfed
English 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.

------
leovander
So 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
> 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

