From dec65a58da34541332140a709f4b6e4a71b7e406 Mon Sep 17 00:00:00 2001 From: Nate Taylor Date: Wed, 23 Oct 2019 19:07:11 -0500 Subject: [PATCH] Wrapping up the code for understanding. --- package.json | 2 +- src/understanding.mjs | 4 ++-- understanding.html | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 45d7825..d68489a 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/understanding.mjs b/src/understanding.mjs index 3a6e428..8e30a63 100644 --- a/src/understanding.mjs +++ b/src/understanding.mjs @@ -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(); diff --git a/understanding.html b/understanding.html index 012ffd8..81068aa 100644 --- a/understanding.html +++ b/understanding.html @@ -3,7 +3,6 @@ - JavaScript Promises and Async Programming @@ -24,7 +23,7 @@

Results