Whats the issue?
edit: after looking at the code I see two issues:
Code
$correctAnswers = "b","d","c","a","c",
You have an extra comma at the end of that line. remove it, otherwise you are trying to add the rest of the script as an object in the array
Code
Write-Host " Question 6 was: `n ", $question6 ," `n Your answer was: `n " $answers[5] ," `n The correct answer was: `n " $correctAnswers[5] ," `n`n "
you only have 5 questions defined.
This post was edited by Minkomonster on Sep 23 2015 05:48pm