Make your page run two conditions
- In VS Code, make a folder
week05-compare/in your private repo. Copy yourweek02-rt/rt.htmlinto it. Copy the Week 5 README into it too. - Before you change any code, fill in the Prediction section of the README: which condition will be slower, by roughly how many ms, and why. Commit it. The commit time is your proof it came first.
- Pick one thing to change between A and B that you think will change speed: square size (72 vs 20 pixels), waiting time (always 1000 ms vs random 800–2200 ms), or brightness (bright vs dim). Not a colour you just like.
- Edit the code. You need all five changes:
// (a) near the top: which condition is running let condition = "A"; // (b) in keyPressed(): A and B keys switch condition if (key === "a" || key === "b") { condition = key.toUpperCase(); note = "Condition " + condition + ". Click Start."; } // (c) in draw() or beginTrial(): make B different. Example for size: const size = condition === "A" ? markSize : 20; rect(width / 2, height / 2 + 10, size, size, 10); // (d) add condition to BOTH results.push({...}) calls, // to the CSV header, and to the .join(",") list condition: condition, // (e) in startBlock(): delete results = []; // so block B does not erase block A - Run it: Practice 6, press a, Start 20, press b, Start 20, Export. You should get one CSV with a
conditioncolumn and at least 40 scored rows. Rename itrt-week05.csvand put it inweek05-compare/. - Load it above. Value column
rt, condition columncondition. Copy the table into your README and write one sentence: did the data agree with your prediction?
The tool leaves out practice trials, anticipations, rows marked usable = 0, wrong answers (correct = 0), and times outside 150–2500 ms.