Advertisement
BLOCKLY18

quiz

Aug 6th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. {
  2. let quizData = [
  3. {question:"What is the exe for the Calculator on Windows 93?",answer:"calc",img:"apps/calc.png"},
  4. {question:"Does Blockly code well?",answer:["no","n","false","!console.log(){'yes'}"],img:"apps/codemirror.png"},
  5. {question:"Who was the first Myspace user?",answer:"tom",img:"apps/catexplorer.png"},
  6. {question:"What is the phone number for the merchant in Robby?",answer:"66602",img:"apps/robby.png"},
  7. {question:"What app is most known for being glitchy?",answer:["solitude","solitare"]},
  8. {question:"What cant Doctor Marburg fix? hydra, IE6, crazy, or dereg32",answer:["crazy","crazy error","crazy.exe"],img:"apps/doctor.gif"},
  9. {question:"Name one currently banned word on Trollbox.",answer:["sonic","discord","roblox","fornite","covid-19","corona","futur1993"],img:"apps/chat.gif"},
  10. {question:"What file has a special effect when you delete it?",answer:["system32.dll","system32"]}
  11. ];
  12. let index = 0;
  13. function quiz(){
  14. if(index >= quizData.length){
  15. $alert.info("You did the entire quiz!");
  16. return;
  17. };
  18. let q = quizData[index];
  19. $prompt({
  20. msg:q.question,
  21. img:`/c/sys/skins/w93/${q.img||"question.png"}`
  22. },"",function(ok,text){
  23. if(!ok) return;
  24. let answer = q.answer;
  25. text = text.toLowerCase().trim();
  26. if(!answer instanceof Array) answer = [answer];
  27. if(answer.includes(text)){
  28. index++;
  29. quiz();
  30. }else{
  31. $confirm("Incorrect. Retry?",function(ok){
  32. if(ok) quiz();
  33. });
  34. };
  35. });
  36. };
  37. quiz();
  38. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement