Skip to content

Commit

Permalink
chore: update JS arrow function question (#676)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristenking authored Sep 9, 2023
1 parent 2598ee7 commit 9f78de2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/data/javascript-quiz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9f78de2

Please sign in to comment.