QuizResult Class
Quiz Result class that holds score information
Constructor
QuizResult
()
Item Index
Methods
Properties
Methods
setResults
(
-
questionResults
Calculates score information from an array of question results and updates properties
Parameters:
-
questionResults
ArrayArray of question results where the index is the question number and the value is whether the question was answered correctly. e.g. [true, true, false]
Properties
results
Array
Array of booleans where the index is the question number and the value is whether the question was answered correctly. Updated by setResults
scorePercentFormatted
Number
Formatted score percent that's more useful to humans (1 - 100). Percent is rounded down. Updated by setResults