PsychoJS: loop.thisTrialN; loop.thisN, are constant

Sorry – Here’s a new version of my text which I hope is clearer.

Don’t
Refer to custom loop names when using methods .thisN, .finished, etc.

Do
All loops are referred to as “trials”.
Use the custom loop name when referring to trialList. Use “trials” for other attributes.

If you only have one loop that you need to refer to, rename it to “trials”. If you have several then don’t worry about renaming them.

For nested loops the inner loop is referenced. It may not be possible to reference the outer loop.