从API

时间:2017-09-21 14:22:28

标签: javascript json ajax

function() {
  var questions = [{
    question: "What is 1*5?",
    choices: [2, 5, 10, 15],
    correctAnswer: 1
  }, {
    question: "What is 2*3?",
    choices: [3, 6, 9, 12],
    correctAnswer: 1
  }, {
    question: "What is 6-3?",
    choices: [2, 9, 8, 3],
    correctAnswer: 3
  }, {
    question: "What is 1*4?",
    choices: [4, 5, 6, 7],
    correctAnswer: 0
  }, {
    question: "What is 6*7?",
    choices: [20, 30, 42, 50],
    correctAnswer: 2
  }];
}

这是我的代码现在我想从api获取这些数据,而不是随意添加如此友好的帮助,因为我是json数据概念的新手。

0 个答案:

没有答案