Skip to content

Commit 138237e

Browse files
committed
fixes
1 parent c4a6c4f commit 138237e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

1-js/06-advanced-functions/12-arrow-functions/article.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Let's revisit arrow functions.
44

5-
Arrow functions are not just a "shorthand" for writing small stuff.
5+
Arrow functions are not just a "shorthand" for writing small stuff. They have some very specific and useful features.
66

77
JavaScript is full of situations where we need to write a small function, that's executed somewhere else.
88

@@ -14,7 +14,7 @@ For instance:
1414

1515
It's in the very spirit of JavaScript to create a function and pass it somewhere.
1616

17-
And in such functions we usually don't want to leave the current context.
17+
And in such functions we usually don't want to leave the current context. That's where arrow functions come in handy.
1818

1919
## Arrow functions have no "this"
2020

2-ui/99-ui-misc/02-selection-range/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ Focus on me, the cursor will be at position 10.
504504

505505
### Example: modifying selection
506506

507-
To modify the content of the selection, we can use `input.setRangeText`. Of course, we can read `selectionStart/End` and, with the knowledge of the selection, change the corresponding substring of `value`, but `setRangeText` is more powerful and often more convenient.
507+
To modify the content of the selection, we can use `input.setRangeText()` method. Of course, we can read `selectionStart/End` and, with the knowledge of the selection, change the corresponding substring of `value`, but `setRangeText` is more powerful and often more convenient.
508508

509509
That's a somewhat complex method. In its simplest one-argument form it replaces the user selected range and removes the selection.
510510

figures.sketch

-128 KB
Binary file not shown.

0 commit comments

Comments
 (0)