Fairly new to programming. I've set up a prompt command to have the user input text or a number which is stored to an array, but the while loop seems to be rewriting over the array value each time it loops.
The array is acting like a variable only storing one value
var course = new Array();
var grade = new Array();
while(confirm("Would you like to add a course?"))
{course = prompt("Enter the course code. Example - ABC1234");