text: // In this js, all custom functions, you want to use are defined; also variables are initialized
  
  /* Variables
  *
  *
  */
  
  // You can determine global (random) parameters here
  const coin = _.sample(["head", "tail"]);
  
  
  /* Helper functions
  *
  *
  */
  
  
  /* For generating random participant IDs */
  
  // dec2hex :: Integer -> String
  const dec2hex = function(dec) {
      return ("0" + dec.toString(16)).substr(-2);
  };
  // generateId :: Integer -> String
  const generateID = function(len) {
      let arr = new Uint8Array((len || 40) /2);
      window.crypto.getRandomValues(arr);
      return Array.from(arr, this.dec2hex).join("");
  };
  
  /* Hooks
  *
  *
  */
  
  // Error feedback if participants exceeds the time for responding
  const time_limit = function(data, next) {
      if (typeof window.timeout === 'undefined'){
          window.timeout = [7500];
      }
      // Add timeouts to the timeoutarray
      // Reminds the participant to respond after 5 seconds
      window.timeout.push(setTimeout(function(){
            $('#reminder').text('Please answer more quickly!');
      }, 5000));
      next();
  };
  
  // compares the chosen answer to the value of `expected`
  check_response = function(data, next) {
      $('input[name=answer]').on('change', function(e) {
          if (e.target.value === data.expected) {
              alert('Yay! You answered correctly!');
          } else {
              alert('Unfortunately, your answer was incorrect :( The correct one was ' + data.expected);
          }
          next();
      })
  }
  