Remove Vowels from a String
Removes all vowels from a given string.
- string
- remove
- vowels
Install
npx shadcn@latest add https://quicksnip.dev/r/remove-vowels-from-a-string.jsonThis snippet is not verified yet. Review it before use, or help verify it.
Code
function removeVowels(str) {
return str.replace(/[aeiouAEIOU]/g, '');
}Usage
removeVowels('Hello World'); // Returns: 'Hll Wrld'