We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a1fdf1 commit f95be4eCopy full SHA for f95be4e
1 file changed
public/sandbox/VDWP4_VisualisingDataWithJS/simpleFetch.js
@@ -1,15 +1,9 @@
1
-//setTimeout(function() {
2
- getText("https://temp.staticsave.com/67d53f98ba08b.txt");
3
-//}, 8000);
4
-/*
5
-setTimeout(getTxt(), 8000);
6
-
7
-function getTxt(){
8
- getText("https://temp.staticsave.com/65d8d1d3d272f.txt");
9
-}
10
-*/
11
async function getText(file) {
12
let myObject = await fetch(file); // myObject is the response object of the fetch()
13
let myText = await myObject.text(); // text() method of response object returns a promise that resolves to a string
14
document.getElementById("demo").innerHTML = myText;
15
+}
+
+//setTimeout(function() {
+ getText("https://temp.staticsave.com/69b491b0ec093.css");
+//}, 8000);
0 commit comments