Update mask.md

This commit is contained in:
Angelos Chalaris
2018-01-01 14:40:29 +02:00
committed by GitHub
parent 629ecb3cff
commit 04f12f285e

View File

@ -9,7 +9,7 @@ Omit the third argument, `mask`, to use a default character of `'*'` for the mas
```js
const mask = (cc,num = 4,mask = '*') =>
cc.slice(0, -num).replace(/./g, mask) + cc.slice(-num);
('' + cc).slice(0, -num).replace(/./g, mask) + ('' + cc).slice(-num);
```
```js