- Delete the loop called trials_2
- Delete the routine called nReps
- The nReps field for show_digits should be nDigits
-
In the text element where you currently have $sequence[show_digits.thisN] change this to $msg
-
Add msg = sequence[show_digits.thisN]
-
Change the code to Both and change show_digits.thisN to snapshot.thisN on the JavaScript side to fix .thisN online. I think this may occur twice.
I did 4 and 6 but for 5. Add msg = sequence[show_digits.thisN] where? in the text elements after $msg?
At the bottom of your Begin Routine code. Add a semi-colon at the end of the JS code
No
At the end after the } bracket so it happens for every digit.
On the left hand side that means not tabbed
Change show_digits to snapshot
sorry in left side?
However, since you did step 6 before step 5 then your experiment won’t work locally because step 5 only exists on one side
Now I know reversed needs to be defined to work online. It might already be in @thomas_pronk ‘s PolyFill component described in my crib sheet or you can wait for me to be on a computer to work out the JS code you’d need to define it on the JS side of Before Experiment.
Thank you and waiting for you…
Put the following in Before Experiment on the JS side only
function reversed(x) {
var revList;
revList = [];
for (var i = 0, _pj_a = x.length; (i < _pj_a); i += 1) {
revList.push(x[((x.length - 1) - i)]);
}
return revList;
}
@Sara_Eskandari, try putting it in “Before Experiment”
@wakecarter, reversed
isn’t in the PsychoPolyfill yet, so let’s add it. I made a ticket for it referencing your implementation: Add `reversed` function (#1) · Issues · Thomas Pronk / demo_polyfill · GitLab
Edit. I see you already posted that line. What do you want to accomplish by calling the list
function?