From 9f78de2d5c999e80d9a6a44c26f1f147a06be332 Mon Sep 17 00:00:00 2001 From: Kristina Degtiareva <68170283+kristenking@users.noreply.github.com> Date: Sat, 9 Sep 2023 00:02:35 -0400 Subject: [PATCH] chore: update JS arrow function question (#676) --- src/data/javascript-quiz.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/data/javascript-quiz.ts b/src/data/javascript-quiz.ts index faaadd7e1..7a66ca9a5 100644 --- a/src/data/javascript-quiz.ts +++ b/src/data/javascript-quiz.ts @@ -326,12 +326,11 @@ 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"