samedi 24 septembre 2022

how to randomize and insert question with picture

please java code to insert picture and random quiz. it does not work:

let MCQS = [
   {question: "What does HTML stand for?",
      choice1: "Hyperlinks and Text Markup Language",
      choice2: "Hyper Text Markup Language",
      choice3: "Hyper Text Making Language",
      choice4: "Hyper Text Mark Language",
      answer: 1
   },
   {question: "What does CSS stand for?",
      choice1: "Colorful StyleSheet",
      choice2: "Creative Style Sheet",
      choice3: "Cascading Style Sheet",
      choice4: "Computer Style Sheet",
      answer: 2
   },
   {question: "Which HTML tag is used to define an internal style sheet?",
      choice1: "<script>",
      choice2: "<style>",
      choice3: "<html>",
      choice4: "<svg>",
      answer: 1
   },
   {question: "Which is the correct CSS syntax?",
      choice1: "body{color:black}",
      choice2: "{body{color:black}",
      choice3: "body={color:black}",  
      choice4: "body:color{black}",
      answer: 0
   },
   {question: "How do you insert a comment in a CSS file?",
      choice1: "/*This is Comment*/",
      choice2: "//This Is Comment",
      choice3: "<!--- This Is Comment --->",
      choice4: "//This Is Comment//",
      answer: 1
   },
   {question: "How do you insert a comment in a HTML file?",
      choice1: "/*This is Comment*/",
      choice2: "//This Is Comment",
      choice3: "<!--- This Is Comment --->",
      choice4: "//This Is Comment//",
      answer: 2
   },
   {question: "Which property is used to change the background color?",
      choice1: "backgroundColor",
      choice2: "BgColor",
      choice3: "Color-Background",
      choice4: "background",
      answer: 3
   },
   {question: "How to write an IF statement in JavaScript?",
      choice1: "if i==5",
      choice2: "if(i==5)",
      choice3: "if(i==5)then",
      choice4: "if i==5 then",
      answer: 2
   },
   {question: "Inside which HTML element do we put the JavaScript?",
      choice1: "xxxx",
      choice2: "xxxxxxx",
      choice3: "xxxxxxxxxx",
      choice4: "xxxxxxxxxxxxxx",
      answer: 2
   },
   {question: "How does a WHILE loop start?",
      choice1: "while(i <= 0)",
      choice2: "while(i <= 0 i++)",
      choice3: "while i <= 0",
      choice4: "while (i++ i <= 0)",
      answer: 0
   }];



Aucun commentaire:

Enregistrer un commentaire