create an array of ten difficult trivia questions in javascript

To create an array of ten difficult trivia questions in JavaScript, you can use the following code snippet:

index.tsx
let difficultTriviaQuestions = [
  "What is the rarest M&M color?",
  "What was the first toy to be advertised on television?",
  "What is the world's smallest country by land area?",
  "What country has the most natural lakes?",
  "Which book series features characters named Katniss, Peeta, and Gale?",
  "Who developed the first successful polio vaccine?",
  "What is the largest type of shark?",
  "What is the only continent to host all four Grand Slam tennis tournaments?",
  "What is the rarest blood type?",
  "Which US state is the only one to grow coffee commercially?"
];
583 chars
13 lines

This will create a variable named difficultTriviaQuestions that contains an array of ten difficult trivia questions. You can access each question using its index, starting with 0:

index.tsx
console.log(difficultTriviaQuestions[0]); // "What is the rarest M&M color?"
console.log(difficultTriviaQuestions[1]); // "What was the first toy to be advertised on television?"
// and so on...
195 chars
4 lines

gistlibby LogSnag