Calculating correct response in OSWEB using js
I have had to update my experiment so that it is compatible with OSWEB and this has left me with a few issues.
Rather than use a linked sketchpad for responses I am now using a custom form with buttons however the output for responses is 'yes' or 'no'.
I have a variable for the correct response in the loop and would like to somehow create a new variable that simply states 1 for correct response or 0 for incorrect response.
So for example if the variable for correct response in the pool is anger and the variable anger_rb is 'yes' then correct_response would = 1.
Thanks in advance for any help!