Below is a zip-file for the most simple psychology experiment ever. Most of it is a hack and I am not a professional programmer, but this particular set-up has worked pretty well for me over the last couple of months.
The file shows how JS can interact with HTML, how a simple task can be set up, data be collected, and submitted to a firebase data base. All within a simple and (so I hope) easy to understand example. I hope someone out there might find it useful, even if it is basic (I have started using JS for experiments less than a year ago).
Have fun, everyone!