Home › Forums › JavaScript › Store JSON data in a variable › Reply To: Store JSON data in a variable
November 21, 2014 at 9:06 am
#188907
GSG
Participant
@traq – I’m building the quiz application from “How to learn JS properly” guide and one of the tasks is to store the quiz questions(an array of objects) in an external JSON file but doesn’t explain why I should do the task.
My quiz questions:
var questions = [{question: 1}, {question: 2}, {question: 3}];
So why I should separate them from the other code?