Well, it is just plain wrong. Even if you wanted to do a for loop in JSX you'd do
<div>
{for (var x=0;x<10;x++) {
<div/>
}}
<div>
Not a templated component like that. That said, I have created repeater components and the like before, largely because JSX is so friendly that more design-minded people can use it very easily.
EDIT: turns out that doesn't actually work, ha. I've never written JSX that way.
You just proved the author's point. The JSX you provided is invalid, since you can't pass `for` as a function argument (see his equivalent bit about `if`).
Huh. Well, my only defense is that I would never even try to write JSX like that anyway - the actual JS in my JSX templates is basically just Array.map calls.
That shouldn't work since syntactically you are in a middle of a function call where you can only have expressions. This is funny because one of the author's point was that JSX makes that confusing because you would never think to write `callFunction(for (var i = 0; ...))` normally.
EDIT: turns out that doesn't actually work, ha. I've never written JSX that way.
on the other hand...