Example JS showing how to read inputs, write outputs and create imaginary input states