Wrapping up the code for understanding.

This commit is contained in:
Nate Taylor
2019-10-23 19:07:11 -05:00
parent d183353d4a
commit dec65a58da
3 changed files with 4 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
"description": "Source code for the Pluralsight course JavaScript Promises and Async Programming",
"main": "index.js",
"scripts": {
"api": "json-server "
"dev": "nodemon ./index.js"
},
"repository": {
"type": "git",

View File

@@ -20,7 +20,7 @@ export function raceCondition() {
}
})[0];
setText(description);
setText(`Order Status: ${description}`);
};
xhr2.send();
@@ -45,7 +45,7 @@ export function callbacks() {
xhr3.onload = () => {
const {description} = JSON.parse(xhr3.responseText);
setText(description);
setText(`Order Item Category: ${description}`);
}
xhr3.onerror = () => setText(xhr3.statusText);
xhr3.send();

View File

@@ -3,7 +3,6 @@
<head>
<meta charset="utf-8">
<title>JavaScript Promises and Async Programming</title>
<meta name="author" content="Nate Taylor">
</meta>