JavaScript Simplified / Chapter 86 Exercises

  • Index of exercises
  • Email me

1

2

3

4

5

6

7

8

9

10

Congratulations. You've aced all the exercises for this chapter.


To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.


Are you ready to rate JavaScript Simplified? on Amazon?


Rate it on Amazon.

0,1,2,3,4,5,6,7,8,9

0

0

0

0

Fill in the blank. const aRequest = new ___HttpRequest(); XML XML
Fill in the blank. const aRequest = new XML__________ HttpRequest(); HttpRequest\(\);
Fill in the blank. const aRequest ___________________ = new XMLHttpRequest(); =newXMLHttpRequest\(\);
Create a new HTML request. Make up the object identifier. const aRequest = new XMLHttpRequest(); const[a-z_$][a-zA-Z0-9_$]*=newXMLHttpRequest\(\);
The request object is named x. Fill in the blank. __________("GET", "sample-text-file-80mg.txt"); x.open x\.open
Fill in the blank. aRequest.open______ "sample-text-file-80mg.txt"); ("GET", \(•GET•,
Fill in the blank. Make up the object identifier. ______________"sample-text-file-80mg.txt"); aRequest.open("GET", [a-z_$][a-zA-Z0-9_$]*\.open\(•GET•,
Open a file with the ".txt" extension. Make up the object identifier and the file name. req.open("GET", "xyz.txt"); [a-z_$][a-zA-Z0-9_$]*\.open\(•GET•,•.*\.txt•\);
Because of security protections, we can't make an HTTP request on CodePen, but we can still use CodePen for practice.
  1. Between the <div> tags in the HTML panel, create a new HTTP request and name it req.
  2. Click the Check your code button to see if you got it right.
  3. Dismiss the alert by clicking OK.
  4. For help with this code, see Chapter 86 in the book.
  1. A new request named req has been created.
  2. Request a file named loris.txt.
  3. Click the Check your code button to see if you got it right.
  4. Dismiss the alert by clicking OK.
  5. For help with this code, see Chapter 86 in the book.