This is a simple RC DC circuit:
Assume initially t=0, Qc=0.
You can adjust DC voltage source, Resistor R and Capacitor C and find out how and changed with time.
Since , so this is the only equation used in EJS to create the simulation.
So it is very easy to create simulation with EJS. Enjoy it!