-
Hello! My GitHub page has a small segement of code that writes a random quote from a list:
Now, could it be possible to grab the “var quotes list” from another JavaScript/JSON/etc. file? If so, how would the code exactly look like? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If I understood your question correctly then my answer is… Here are three files test.js, script.js and index.html test.js
script.js
and index.html [blank file] What you would do is add this code to the HTML page:
Please tell me if I misunderstood your question. |
Beta Was this translation helpful? Give feedback.
-
That’ll work. Thank you. |
Beta Was this translation helpful? Give feedback.
If I understood your question correctly then my answer is…
Here are three files test.js, script.js and index.html
test.js
script.js
and index.html
[blank file]
What you would do is add this code to the HTML page:
Please tell me if I misunderstood your question.