Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new javascript quiz (#358) #2

Merged
merged 1 commit into from Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/data/javascript-quiz.ts
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