Welcome

This book will teach you how to create behavioral experiments using jsPsych. jsPsych is a JavaScript-based framework for developing experiments that run in a web browser. Any device with a modern web browser installed (e.g., desktops, laptops, tablets, and mobile phones) can run jsPsych experiments. Experiments can be delivered via a web server for online participants, or run locally on a computer in a laboratory.

Each chapter of this book illustrates a key feature or set of related features of jsPsych by walking you through the creation of a real experiment from the cognitive science literature. If you are brand new to jsPsych (or web-based programming in general), it’s recommended that you work through the chapters in order. Experiments later in the book build off the concepts introduced by earlier experiments. If you are already familiar with jsPsych and are looking to learn about a specific technique, each chapter should be sufficiently self-contained that you can jump around.

This book is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Suggestions, requests for clarification, corrections, and contributions are welcome! Please use the Issue Tracker in the book’s GitHub repository or open a pull request.

This book is written in RMarkdown with bookdown.