Some probelm in your conde:
There are 1 logic problem: at start the array is empty, then you need to update when user answers.
Look at jquery api : api.jquery.com : and use it a lot.
Use Expression Manager and not INSERTANS
document.write is a bad idea, because you can do it only when javascript is done : then you need to add some extra div.

Surely some error, but you can try something like this: (adding <span id="whatisA1"></span>)