diff --git a/playground/src/components/TodoFooter.tsx b/playground/src/components/TodoFooter.tsx index 889f05c..66f0c47 100644 --- a/playground/src/components/TodoFooter.tsx +++ b/playground/src/components/TodoFooter.tsx @@ -30,7 +30,7 @@ export const TodoFooter = connect( return ( - {itemCount} item{itemCount > 1 ? 's' : ''} left + {itemCount} item{itemCount === 1 ? '' : 's'} left props.clear()}>Clear Completed diff --git a/step1-01/js-demo/README.md b/step1-01/js-demo/README.md index 3343979..1713430 100644 --- a/step1-01/js-demo/README.md +++ b/step1-01/js-demo/README.md @@ -63,7 +63,7 @@ function displayMatches() { ### Iteration -Next we'll update our function to iterate through a string of letters. We loop over each letter using the [`for of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) syntax. We'll use real input later, but for now this varifies that our function is working. +Next we'll update our function to iterate through a string of letters. We loop over each letter using the [`for of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) syntax. We'll use real input later, but for now this verifies that our function is working. ```js function displayMatches() { @@ -90,7 +90,7 @@ function displayMatches() { } ``` -> In JavaScript, it's safest to use strict `===` for comparisons, because `==` will try to convert the operands to the same type (and sometimes the behavior is [not what you'd expect](https://www.youtube.com/watch?v=et8xNAc2ic8)). For example, `"1" == 1` is true whereas `"1" === 1` would be false. +> In JavaScript, it's safest to use strict `===` for comparisons, because `==` will try to convert the operands to the same type. For example, `"1" == 1` is true whereas `"1" === 1` is false, but the behavior in certain other cases is [not what you'd expect](https://www.youtube.com/watch?v=et8xNAc2ic8). (See [this video](https://www.destroyallsoftware.com/talks/wat) for more strange JavaScript behavior.) ### Interacting with the DOM diff --git a/step1-02/exercise/README.md b/step1-02/exercise/README.md index b5c4e8d..a3769f1 100644 --- a/step1-02/exercise/README.md +++ b/step1-02/exercise/README.md @@ -4,7 +4,7 @@ 2. Add 4 list items with class `todo` inside of that list with the following content `` 3. Add a span and a button to your footer -4. Span content should be `4 items left` and button should say `Clear Completed` and have a class of `submit` 5. Go into the CSS file and add `display: flex` to the footer. Also add `flex-grow:1` to the span inside of the footer > Hint: Look back at the CSS demo to see the various ways you can use selectors to target existing HTML diff --git a/step1-06/demo/README.md b/step1-06/demo/README.md index 7a61d01..d559ab7 100644 --- a/step1-06/demo/README.md +++ b/step1-06/demo/README.md @@ -99,11 +99,17 @@ In CSS-based styling, visual states are applied by adding and removing classes. #### Adding a Controlled Input -In traditional HTML forms, users interact with the form, and on submit, those values are captured and transmitted. Those are called **uncontrolled inputs**. +In React, form elements such as ``, `