Skip to content

Commit 74c8dbd

Browse files
committed
Remove arrow function from example in chapter 1 (fixes nzakas#45)
1 parent dc3f9b7 commit 74c8dbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

manuscript/01-The-Basics.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ the character "æ" and the string "ae" may be used interchangeably even though t
110110
ECMAScript 6 supports the four Unicode normalization forms through a new `normalize()` method on strings. This method optionally accepts a single parameter, one of `"NFC"` (default), `"NFD"`, `"NFKC"`, or `"NFKD"`. It's beyond the scope of this book to explain the differences between these four forms. Just keep in mind that, in order to be used, you must normalize both strings that are being compared to the same form. For example:
111111

112112
```js
113-
var normalized = values.map(text => text.normalize());
113+
var normalized = values.map(function(text) {
114+
return text.normalize();
115+
});
114116
normalized.sort(function(first, second) {
115117
if (first < second) {
116118
return -1;

0 commit comments

Comments
 (0)