Javascript code for quiz