Skip to content

Commit 0da344a

Browse files
authored
Merge pull request nzakas#311 from kwasniew/master
Fixing SyntaxError: Unexpected token =
2 parents c935402 + b53f25a commit 0da344a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

manuscript/06-Symbols.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,17 +340,17 @@ The ability to define these properties on an object allows you to create objects
340340
```js
341341
// effectively equivalent to /^.{10}$/
342342
let hasLengthOf10 = {
343-
[Symbol.match] = function(value) {
343+
[Symbol.match]: function(value) {
344344
return value.length === 10 ? [value.substring(0, 10)] : null;
345345
},
346-
[Symbol.replace] = function(value, replacement) {
346+
[Symbol.replace]: function(value, replacement) {
347347
return value.length === 10 ?
348348
replacement + value.substring(10) : value;
349349
},
350-
[Symbol.search] = function(value) {
350+
[Symbol.search]: function(value) {
351351
return value.length === 10 ? 0 : -1;
352352
},
353-
[Symbol.split] = function(value) {
353+
[Symbol.split]: function(value) {
354354
return value.length === 10 ? ["", ""] : [value];
355355
}
356356
};

0 commit comments

Comments
 (0)