My 4th Script: Intermediate Words Demo Experiment Run Experiment

My 4th Script: Intermediate Words


This is the same word task as My 1st Script, but created using a more advanced method.

My 4th Script shows the eight words to be remembered using a “for-loop” rather than typing out the steps eight times (like in My 1st Script). This is a more concise and less error-prone way to produce an identical task.

Topics introduced: var, arrays, for-loop

If you are a registered user and signed in, you can here copy this script and its stimuli to your own account, where you can edit it and change it in any way you want.

It is absolutely free to register (no credit card info asked!). You can then instantly copy this experiment with one click and edit it, change its accompanying texts, its landing page, stimuli, etc. Invite your colleagues, friends, or students to check out your experiment. There is no limit on how many people can do your experiment, even with a free account.

The catch? There is no catch! Just keep in mind that with a free account, you cannot collect data. For teaching that is usually not a problem. For research, prepaid data collection (unlimited subjects) starts as low as €10.00 for a 10-day period.

var i;
var vocab = ["apple","chair","tent","bowl","clock","bike","tree","cat"];

instruction("Remember as many of the following eight words as you can.");

/* This is called a "for-loop". It means we don't have to retype the same steps 
over and over. The arguments translate to "start counting with i equalling 0, 
keep repeating the loop (i.e., the steps inside the curly brackets) as long as 
i is less than the number of elements in "vocab" (i.e., 7 because counting 
starts at 0), and increase i by 1 each time that the loop is completed.*/

for (i = 0; i < vocab.length; i = i + 1)
    text(vocab[i]); // Instead of writing the word to be shown inside the
    await(2000);    // brackets, we simply refer to the i-th position of "vocab"

largeinput("Please type the words that you can remember.","words_recalled");

You can download the files as follows: Click on the file (link) and then right-click and choose Save as... from the menu. Some media files (e.g., sound) will have a download button for this purpose.

This experiment has no files of this type
This experiment has no files of this type
This experiment has no files of this type
This experiment has no YouTube links
This experiment has no files of this type