Skip to content

Commit d974090

Browse files
committed
fixes
1 parent 40a4e18 commit d974090

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

1-js/02-first-steps/12-while-for/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ while (i) { // when i becomes 0, the condition becomes falsy, and the loop stops
4747
}
4848
```
4949

50-
````smart header="Brackets are not required for a single-line body"
51-
If the loop body has a single statement, we can omit the brackets `{…}`:
50+
````smart header="Curly braces are not required for a single-line body"
51+
If the loop body has a single statement, we can omit the curly braces `{…}`:
5252
5353
```js run
5454
let i = 3;

2-ui/2-events/01-introduction-browser-events/02-hide-self-onclick/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Can use `this` in the handler to reference "itself" here:
1+
Can use `this` in the handler to reference "the element itself" here:
22

33
```html run height=50
44
<input type="button" onclick="this.hidden=true" value="Click to hide">

2-ui/2-events/01-introduction-browser-events/04-move-ball-field/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ To get field-relative `left` coordinate of the click, we can substract the field
3636
let left = event.clientX - fieldCoords.left - field.clientLeft;
3737
```
3838

39-
Normally, `ball.style.position.left` means the "left edge of the element" (the ball). So if we assign that `left`, then the ball edge would be under the mouse cursor.
39+
Normally, `ball.style.position.left` means the "left edge of the element" (the ball). So if we assign that `left`, then the ball edge, not center, would be under the mouse cursor.
4040

4141
We need to move the ball half-width left and half-height up to make it center.
4242

2-ui/2-events/01-introduction-browser-events/05-sliding-menu/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Like this:
2929

3030
So if we set `onclick` on it, then it will catch clicks to the right of the text.
3131

32-
...but `<span>` has an implicit `display: inline`, so it occupies exactly enough place to fit all the text:
32+
As `<span>` has an implicit `display: inline`, it occupies exactly enough place to fit all the text:
3333

3434
```html autorun height=50
3535
<span style="border: solid red 1px" onclick="alert(1)">Sweeties (click me)!</span>

0 commit comments

Comments
 (0)