We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 535884e commit bfe9549Copy full SHA for bfe9549
JavaScript/3-xhr.html JavaScript/4-xhr.htmlJavaScript/3-xhr.html renamed to JavaScript/4-xhr.html
@@ -9,9 +9,8 @@
9
const xhr = new XMLHttpRequest();
10
xhr.onreadystatechange = () => {
11
if (xhr.readyState === XMLHttpRequest.DONE) {
12
- message.innerHTML = (xhr.status === 200 ?
13
- xhr.responseText : 'Error code: ' + xhr.status
14
- );
+ message.innerHTML = xhr.status === 200 ?
+ xhr.responseText : `Error code: ${xhr.status}`;
15
}
16
};
17
xhr.open('GET', '/person', true);
JavaScript/3-xhr.js JavaScript/4-xhr.jsJavaScript/3-xhr.js renamed to JavaScript/4-xhr.js
@@ -3,7 +3,7 @@
3
const fs = require('fs');
4
const http = require('http');
5
6
-const index = fs.readFileSync('./3-xhr.html');
+const index = fs.readFileSync('./4-xhr.html');
7
8
http.createServer((req, res) => {
if (req.url === '/person') {
0 commit comments