File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -340,17 +340,17 @@ The ability to define these properties on an object allows you to create objects
340
340
``` js
341
341
// effectively equivalent to /^.{10}$/
342
342
let hasLengthOf10 = {
343
- [Symbol .match ] = function (value ) {
343
+ [Symbol .match ]: function (value ) {
344
344
return value .length === 10 ? [value .substring (0 , 10 )] : null ;
345
345
},
346
- [Symbol .replace ] = function (value , replacement ) {
346
+ [Symbol .replace ]: function (value , replacement ) {
347
347
return value .length === 10 ?
348
348
replacement + value .substring (10 ) : value;
349
349
},
350
- [Symbol .search ] = function (value ) {
350
+ [Symbol .search ]: function (value ) {
351
351
return value .length === 10 ? 0 : - 1 ;
352
352
},
353
- [Symbol .split ] = function (value ) {
353
+ [Symbol .split ]: function (value ) {
354
354
return value .length === 10 ? [" " , " " ] : [value];
355
355
}
356
356
};
You can’t perform that action at this time.
0 commit comments