Skip to content

Commit

Permalink
feat: add new javascript quiz (freeCodeCamp#358)
Browse files Browse the repository at this point in the history
* feat: add new javascript quiz

* fix: add recommended changes to src/data/javascript-quiz.ts file

fix: add recommended changes to src/data/javascript-quiz.ts file

Co-authored-by: Jessica Wilkins  <67210629+jdwilkin4@users.noreply.github.com>

Co-authored-by: Jessica Wilkins  <67210629+jdwilkin4@users.noreply.github.com>
  • Loading branch information
Evavic44 and jdwilkin4 committed Oct 14, 2022
1 parent 02b31f6 commit cedfcdd
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/data/javascript-quiz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ const javascriptQuiz = [
".push() returns the new length of the array, after the element has been pushed",
Link: "https://www.freecodecamp.org/news/how-to-insert-an-element-into-an-array-in-javascript/",
},
{
{
Question:
"In JavaScript, which method allows you to cancel a repeated action created with setInterval()?",
Answer: "clearInterval",
Expand All @@ -1274,8 +1274,8 @@ const javascriptQuiz = [
Distractor3: "stopInterval",
Explanation:
"This clearInterval() method is used to stop the timed loop that was started by the setInterval() method.",
Link: "https://www.freecodecamp.org/news/javascript-timing-events-settimeout-and-setinterval/",
},
Link: "https://www.freecodecamp.org/news/javascript-timing-events-settimeout-and-setinterval/",
},
{
Question:
"In JavaScript, which of the following is NOT the correct way to declare a variable?",
Expand Down Expand Up @@ -1550,6 +1550,17 @@ const javascriptQuiz = [
"The toFixed() method converts a number to a string and rounds it to a specified number of decimals.",
Link: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed",
},
{
Question:
"In JavaScript, which operator has the highest precedence among these options?",
Answer: "Grouping ()",
Distractor1: "Increment ++",
Distractor2: "Unary plus +",
Distractor3: "Equality ==",
Explanation:
"On the precendence table, the grouping () operator is the highest with a precedence value of 18",
Link: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#table",
},
{
Question:
"In JavaScript, all objects inherit a built-in property from a ___________________.",
Expand Down

0 comments on commit cedfcdd

Please sign in to comment.