4 Working with jsPsych data
When working with data, we want to access the data after it’s been collected. That is, the code that is used to access the data must run during the experiment or after it has finished, rather than when the page first loads. This means that we cannot access data in our main experiment script, because that code will run immediately when the page first loads, and there is no data at that point. (Example with code?) Instead, the code to access the data must go inside of a parameter function that is called at a specific point during the experiment, or after the experiment has finished. This chapter does not include a detailed explanation of the way that these parameter functions work, because this chapter is focused on the structure of jsPsych data and the tools that jsPsych provides for working with data. Throughout this chapter, you can simply ignore the fact that the data functions are placed inside of parameter functions, as this will be covered in CHAPTER XXX and CHAPTER XXX.