OK, this is an annotated version of the above (from which I’ve deleted an unused variable declaration. Don’t run the version with annotation is (reason further below.)
I think where you are getting lost is the loop variable. It is just a name. I used ‘anAttr’ but it could be ‘x’ or "PlyerTwoHasLost’. It’s just a name you decide when you code the
.each() loop. Thus in:
within the loop every case-sensitive use of the word ‘blinken’ (recall, it’s whatever you code), Tinderbox fetches the value of the current list item. so if the list is "ant;bee;cow’, on the first loop the value of
ant, the loop iteration is it
bee, etc. As the variable is case sensitive
Blinken would hold no value as Tinderbox doesn’t know what that string is for. Remember you told Tinderbox that in this .each() loop that you wish are declaring
blinken as the loop variable. You could have chosen
HovercraftFullOfEels but you chose
blinken, because you just did.
You may note that that I tend to use an ‘a’ or ‘an’ prefix to a word that indicates what the loop variable does.
The issue about not using the commented code is that the seem to be a few glitches where although the code colours correctly, Tinderbox is ‘seeing’ and acting on text in the comment. It will get reported. For now, I’d just keep commented and uncommented and run the latter!
Must dash, dinner guests arriving.