Create noVowels.md

This commit is contained in:
Rohit Tanwar
2018-01-09 14:46:30 +05:30
committed by GitHub
parent f007d37d29
commit 26959910a1

14
snippets/noVowels.md Normal file
View File

@ -0,0 +1,14 @@
### noVowels
Returns all the vowels in a `str` replaced by `repl`.
Skip `repl` to use a default value of `''`
```js
const noVowels = (str,repl = '') => str.replace(/[aeiou]/gi,repl)
```
```js
noVowels("foobAr"); // "fbr"
noVowels("foobAr","*"); //f**b*r
```