diff --git a/src/data/javascript-quiz.ts b/src/data/javascript-quiz.ts index 87623feb1..657f25875 100644 --- a/src/data/javascript-quiz.ts +++ b/src/data/javascript-quiz.ts @@ -326,19 +326,18 @@ const javascriptQuiz = [ Link: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality" }, { - Question: - "In JavaScript, select the right syntax for an ES6 arrow function:", - Answer: "let variable = () => {//code block}", - Distractor1: "let variable => (){//code block}", - Distractor2: "let variable = function() => {//code block}", - Distractor3: "let variable = function(){//code block}", + Question: "Select the correct syntax for a JavaScript ES6 arrow function:", + Answer: "const variable = () => // code", + Distractor1: "const variable <=> ()()// code ", + Distractor2: "const variable === function() => {//code}", + Distractor3: "const variable =>> function(){//code}", Explanation: "ES6 arrow functions provide you with an alternative way to write shorter syntax compared to the traditional function expression.", Link: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions" }, { Question: - "In JavaScript, what will be the value of output? let output = null ?? 20", + "In JavaScript, what will be the value for the following code: null ?? 20", Answer: "20", Distractor1: "undefined", Distractor2: "null",