Quiz Type: True or False

' which are HTML elements used for embedding scripts. Therefore, this statement is true.", "c": { "A": "True", "B": "False" }, "a": "A" }, { "q": "The string '20<ScRiPt>JvDf(9032)</sCripT>' is correctly encoded for HTML.", "e": "The use of '<' and '>' indicates that the less-than and greater-than signs have been encoded for HTML. Thus, this statement is true.", "c": { "A": "True", "B": "False" }, "a": "A" }, { "q": "The term 'ScRiPt' is case-sensitive in HTML.", "e": "In HTML, tag names are case-insensitive, meaning 'ScRiPt', 'script', or 'SCRIPT' would all be treated the same by browsers. Therefore, this statement is false.", "c": { "A": "True", "B": "False" }, "a": "B" }, { "q": "The content of the code snippet appears to be a JavaScript function call.", "e": "The presence of 'JvDf(9032)' suggests a function call in JavaScript, which typically includes parameters in parentheses. Hence, this statement is true.", "c": { "A": "True", "B": "False" }, "a": "A" }, { "q": "The code snippet is safe from cross-site scripting (XSS) attacks.", "e": "Encoding user inputs is a good practice to prevent XSS attacks, but without context, one cannot definitively say the code is safe. Therefore, this statement is false.", "c": { "A": "True", "B": "False" }, "a": "B" }, { "q": "The '9032' in the code snippet could represent a parameter passed to the function.", "e": "The number '9032' fits the common pattern of integers being passed as arguments to functions, indicating this statement is true.", "c": { "A": "True", "B": "False" }, "a": "A" } ] }; var quizType = "tf"; var version = '1'; var versionId = quizType === "mc" && (version === '1' || version === '') ? "v1" : "v" + version; if (versionId == "v1") { // loop through and add a questionIndex to each question jsonData.forEach(function(question, index) { question.questionIndex = index; }); } var source = document.getElementById("quiz-template-" + versionId).innerHTML; const template = Handlebars.compile(source); const context = { data: jsonData, signedIn: true }; const html = template(context); $("#main-response").html(html); $(document).on('change', "#show-answers", function() { $(".answer").toggle(this.checked); }); $(document).on('change', '.question .form-check-input', function() { $(this).closest('.question').find('.answer').show(); });