Skip to content

Commit

Permalink
Defined the questions, choices, and answers
Browse files Browse the repository at this point in the history
  • Loading branch information
deponte-designer committed Dec 5, 2023
1 parent d804b9b commit f15fb5b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions assets/js/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,37 @@



// Define the questions, choices, and answers
const questions = [
{
question: "Commonly used data types DO NOT include:",
choices: ["strings", "booleans", "alerts", "numbers"],
answer: "alerts",
},
{
question: "The condition in an if / else statement is enclosed within _______ .",
choices: ["quotes", "curly brackets", "parentheses", "square brackets"],
answer: "parentheses",
},
{
question: "Arrays in JavaScript can be used to store _______ .",
choices: ["numbers and strings", "other arrays", "booleans", "all of the above"],
answer: "all of the above",
},
{
question: "String values must be enclosed within _______ when being assigned to variables.",
choices: ["commas", "curly brackets", "quotes", "parentheses"],
answer: "quotes",
},
{
question: "A very useful tool used during development and debugging for printing content to the debugger is:",
choices: ["JavaScript", "terminal /bash", "for loops", "console.log"],
answer: "console.log",
},
];

// import questions from "./questions.js"; // doesn't work because we didn't learn yet how to use node

// Elements
const startButton = document.getElementById("start");
const timeElement = document.getElementById("time");
Expand Down

0 comments on commit f15fb5b

Please sign in to comment.