1
2
3
4
5
6
7
8
9
10
To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.
0,1,2,3,4,5,6,7,8,9
0
0
0
0
Fill in the blank. | let aRequest = new XMLHttpRequest(); aRequest.open("GET", "sample-text-file-80mg.txt"); aRequest.onload = ______________ if (aRequest.status === 200) { document.querySelector("#place-to-put-it").textContent = aRequest.responseText; } else { document.querySelector("#place-to-put-it ").textContent = "Failed to load the text file"; } }; aRequest.send(); | function() { | function\(\){ |
Fill in the blank. | let aRequest = new XMLHttpRequest(); aRequest.open("GET", "sample-text-file-80mg.txt"); ______________________ if (aRequest.status === 200) { document.querySelector("#place-to-put-it").textContent = aRequest.responseText; } else { document.querySelector("#place-to-put-it ").textContent = "Failed to load the text file"; } }; aRequest.send(); |
aRequest.onload = function() { | aRequest\.onload=function\(\){ |
Fill in the blank. | let aRequest = new XMLHttpRequest(); aRequest.open("GET", "sample-text-file-80mg.txt"); aRequest.onload = function() { if (aRequest.status === ______ document.querySelector("#place-to-put-it").textContent = aRequest.responseText; } else { document.querySelector("#place-to-put-it ").textContent = "Failed to load the text file"; } }; aRequest.send(); |
200) { | 200\){ |
Fill in the blank. | let aRequest = new XMLHttpRequest(); aRequest.open("GET", "sample-text-file-80mg.txt"); aRequest.onload = function() { if (_____________200) { document.querySelector("#place-to-put-it").textContent = aRequest.responseText; } else { document.querySelector("#place-to-put-it ").textContent = "Failed to load the text file"; } }; aRequest.send(); |
aRequest.status === | aRequest\.status=== |
Fill in the blank. | let aRequest = new XMLHttpRequest(); aRequest.open("GET", "sample-text-file-80mg.txt"); aRequest.onload = function() { _________________________________________ document.querySelector("#place-to-put-it").textContent = aRequest.responseText; } else { document.querySelector("#place-to-put-it ").textContent = "Failed to load the text file"; } }; aRequest.send(); |
if (aRequest.status === 200) { | if\(aRequest\.status===200\){ |
Fill in the blank. | let aRequest = new XMLHttpRequest(); aRequest.open("GET", "sample-text-file-80mg.txt"); aRequest.onload = function() { if (aRequest.status === 200) { document.querySelector("#place-to-put-it").textContent = __________________ } else { document.querySelector("#place-to-put-it ").textContent = "Failed to load the text file"; } }; aRequest.send(); |
aRequest.responseText; | aRequest\.responseText; |
Fill in the blank. Make up the error message text. | let aRequest = new XMLHttpRequest(); aRequest.open("GET", "sample-text-file-80mg.txt"); aRequest.onload = function() { if (aRequest.status === 200) { document.querySelector("#place-to-put-it").textContent = aRequest.responseText; } else { ____________________________________________________________________ } }; aRequest.send(); |
document.querySelector("#place-to-put-it ").textContent = "Failed to load the text file"; | document\.querySelector\(•#place-to-put-it•\)\.textContent=•.*•; |
Fill in the blank. Make up the paragraph ID to copy the .txt file or error message into. Make up the error message text. | let aRequest = new XMLHttpRequest(); aRequest.open("GET", "sample-text-file-80mg.txt"); ______________________________ ______________________________ _____________________________________________________ _____ ________________________________________________ ___ __ aRequest.send(); |
aRequest.onload = function() { if (aRequest.status === 200) { document.querySelector("#place-to-put-it").textContent = aRequest.responseText; } else { document.querySelector("#place-to-put-it ").textContent = "Failed to load the text file"; } }; |
aRequest\.onload=function\(\){[\r\n]if\(aRequest\.status===200\){[\r\n]document\.querySelector\(•(.*)•\)\.textContent=aRequest\.responseText;[\r\n]}else{[\r\n]document\.querySelector\(•\1•\)\.textContent=•.*•;[\r\n]}[\r\n]}; |
|
|||
|