diff --git a/content/assignments/candidate-testing/task-1/index.md b/content/assignments/candidate-testing/task-1/index.md index 042c4d74..656bfb0b 100644 --- a/content/assignments/candidate-testing/task-1/index.md +++ b/content/assignments/candidate-testing/task-1/index.md @@ -75,6 +75,14 @@ The rest of the tests are for Tasks 2 and 3. {{% notice blue "Note" "rocket" %}} Make sure your small app works properly before moving on to task 2. + Run the following command to make sure the app is running without errors, if you do encounter any errors: + 1. Revisit the above instructions step by step to ensure you completed all steps in Task 1. + 1. If you are still encountering problems, take a look back at [this page]({{< relref "../../../errors-and-debugging/reading/asking-good-questions/index.md" >}}) and reach out to your instructional assistant. + + ```JavaScript + node index.js + ``` + This is also a great time to save, commit, and push up your work. {{% /notice %}} diff --git a/content/assignments/candidate-testing/task-2/index.md b/content/assignments/candidate-testing/task-2/index.md index dadc98b0..9674eca1 100644 --- a/content/assignments/candidate-testing/task-2/index.md +++ b/content/assignments/candidate-testing/task-2/index.md @@ -35,6 +35,12 @@ Now that your small app is working, expand it to deal with multiple questions. T {{% notice blue "Note" "rocket" %}} Make sure your loops work properly before moving on to task 3. + Run the following command to make sure the app is running without errors: + + ```JavaScript + node index.js + ``` + This is also a great time to save, commit, and push up your work. {{% /notice %}} diff --git a/content/assignments/mars-rover/rover-class/_index.md b/content/assignments/mars-rover/rover-class/_index.md index 31e4620f..40f43e1a 100644 --- a/content/assignments/mars-rover/rover-class/_index.md +++ b/content/assignments/mars-rover/rover-class/_index.md @@ -66,7 +66,7 @@ console.log(response); ### Rover Tests -Create `spec/rover.spec.js` and write the following tests. Write the code to make them pass in `rover.js`. Remember to use the given phrase as the test description. +Within the `spec/rover.spec.js` file, write the tests below. Make sure to write the code to make them pass in `rover.js`. Remember to use the given phrase as the test description. **Test 7** diff --git a/content/fetch/exercises/_index.md b/content/fetch/exercises/_index.md index 7d667e86..88b2d7e7 100644 --- a/content/fetch/exercises/_index.md +++ b/content/fetch/exercises/_index.md @@ -103,6 +103,10 @@ Add this preliminary HTML to your `fetch_planets` document: ``` {{% /expand %}} +{{% notice blue Note "rocket" %}} +You should not expect a response. Take note of the error that you see in the console! +{{% /notice %}} + 1. Our last task left us with some knowledge about where and how we can use the fetched data, but we don't really want to keep those changes. Instead, how about we use an event to change the planet information we see? Let's move the DOM manipulation to inside a click handler. ```javascript diff --git a/content/fetch/reading/fetching-data/_index.md b/content/fetch/reading/fetching-data/_index.md index 60ef6420..dedbe268 100644 --- a/content/fetch/reading/fetching-data/_index.md +++ b/content/fetch/reading/fetching-data/_index.md @@ -54,10 +54,6 @@ Launch Status web page, which we will add weather data to. ``` {{% /notice %}} -{{% notice orange Warning "rocket" %}} -Before going through the `fetch` examples, please know that `fetch` does NOT work in Internet Explorer. [List of alternative browsers](https://browsehappy.com) -{{% /notice %}} - ## `fetch` Function To request the weather data, we will use the `fetch` function. `fetch` is a @@ -275,4 +271,4 @@ What is the correct syntax for `fetch`? 1. `fetch("https://api.url").doStuff(...);` 1. `fetch("https://api.url").then(...);` -{{% /notice %}} \ No newline at end of file +{{% /notice %}} diff --git a/content/http/reading/how-the-internet-works/index.md b/content/http/reading/how-the-internet-works/index.md index bd402fa8..ac41343d 100644 --- a/content/http/reading/how-the-internet-works/index.md +++ b/content/http/reading/how-the-internet-works/index.md @@ -57,7 +57,7 @@ When a server sends a file back to a client, that file must physically be sent a {{% notice blue "Note" "rocket" %}} - You can think of the Internet as a ["series of tubes."](https://www.youtube.com/watch?time_continue=15&v=_cZC67wXUTs) This phrase was used by a U.S. Senator in 2006 and widely mocked. However, we think it's actually a reasonable analogy. TCP/IP allows data to be passed from one tube to another until reaching the final destination. + You can think of the Internet as a "[series of tubes.](https://www.youtube.com/watch?time_continue=15&v=_cZC67wXUTs)" This phrase was used by a U.S. Senator in 2006 and widely mocked. However, we think it's actually a reasonable analogy. TCP/IP allows data to be passed from one tube to another until reaching the final destination. {{% /notice %}} diff --git a/content/more-on-functions/reading/functions-as-values/_index.md b/content/more-on-functions/reading/functions-as-values/_index.md index 203be7f7..c8ad2f68 100644 --- a/content/more-on-functions/reading/functions-as-values/_index.md +++ b/content/more-on-functions/reading/functions-as-values/_index.md @@ -18,7 +18,7 @@ Functions are powerful tools in any programming language, and JavaScript uses th We [defined a value]({{< relref "../../../data-and-variables/reading/values-and-data-types/_index.md" >}}) as "a specific piece of data." Some examples are the number `42`, the string `"LC101"`, and the array `["MO", "FL", "DC"]`. *Functions appear to be very different from other keywords we have worked with, they share many core characteristics. -In particular, functions have a data type, similar too other javascript objects. Recall that a **data type** is a group of values that share characteristics, such as strings and numbers. Strings share the characteristics of having a length, while numbers don't. Numbers can be manipulated in ways that strings cannot, via operations like division and subtraction. +In particular, functions have a data type, similar to other javascript objects. Recall that a **data type** is a group of values that share characteristics, such as strings and numbers. Strings share the characteristics of having a length, while numbers don't. Numbers can be manipulated in ways that strings cannot, via operations like division and subtraction. {{% notice blue Example "rocket" %}} The data type of the type conversion function `Number` is `function`. In fact, all functions are of type `function`. diff --git a/content/objects-and-math/exercises/_index.md b/content/objects-and-math/exercises/_index.md index 1d1751e7..e8a8cc0d 100644 --- a/content/objects-and-math/exercises/_index.md +++ b/content/objects-and-math/exercises/_index.md @@ -138,18 +138,22 @@ take for each animal to reach 20 steps. ```js {linenos=true} function fitnessTest(candidates){ - let results = [], numSteps, turns; - for (let i = 0; i < candidates.length; i++){ - numSteps = 0; - turns = 0; + let results = [], numSteps, turns; + + for (let i = 0; i < candidates.length; i++){ + numSteps = 0; + turns = 0; + while(numSteps < 20){ - numSteps += candidates[i].move(); - turns++; + numSteps += candidates[i].move(); + turns++; } + results.push(`${candidates[i].name} took ${turns} turns to take 20 steps.`); } + return results; } ``` -{{% /expand %}} \ No newline at end of file +{{% /expand %}} diff --git a/content/unit-testing/reading/tdd-in-action/index.md b/content/unit-testing/reading/tdd-in-action/index.md index f94a3614..027d8a6e 100644 --- a/content/unit-testing/reading/tdd-in-action/index.md +++ b/content/unit-testing/reading/tdd-in-action/index.md @@ -146,7 +146,10 @@ returned an object. ### Code Red -Let's run the test! Click the `run >` button in your repl.it. +Let's run the test! + +Type in the command `npm run test` to check your test. + You should see an error about `processor.js` not existing. This makes sense, because we have not created the file yet. We are officially in the Red phase of Red, Green, Refactor! @@ -249,8 +252,8 @@ The `id` is the part of the transmission *before* the `"::"`. The same steps will be followed, even though they are not explicitly listed. See lines *16 - 19* to see the test added for this requirement. To test -this case `not.toEqual()` was used, which is checking if the two values -are NOT equal. `not.toEqual()` is used to make sure that `result.id` +this case `not.toBeUndefined()` was used, which is checking if the two values +are NOT equal. `not.toBeUndefined()` is used to make sure that `result.id` is NOT equal to `undefined`. Remember that if you reference a property on an object that does NOT exist, `undefined` is returned. @@ -463,4 +466,4 @@ below. Take your time, you can do it! 1. Return `-1` if more than one `"::"` is found in `transmission`. 1. Do not include the `< >` symbols in the value assigned to `rawData`. 1. Return `-1` for the value of `rawData` if anything besides numbers are - present between the `< >` symbols. \ No newline at end of file + present between the `< >` symbols.