Each task presents a sequence of frames/objects. In its simplest form the task sequence is an ordered list (an array) of frames (e.g., pages in a questionnaire), and it activates them one after the other. There are several ways that you can control the sequence order (e.g., random selection of questionnaire questions).
Templates are the way you can use local variables and custom Javascript within your tasks
Environmental variables