Back to all solutions
#1119 - Remove Vowels from a String
Problem Description
Given a string s, remove the vowels 'a', 'e', 'i', 'o', and 'u' from it, and return the new string.
Solution
/**
* @param {string} s
* @return {string}
*/
var removeVowels = function(s) {
return s.replace(/[aeiou]/g, '');
};