Created
October 30, 2016 04:50
-
-
Save danielborowski/470a1d13c752bbe92e274955eb4983eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this function is supposed to take in a string and return | |
// a new string with all the vowels removed | |
function removeVowels(str) { | |
var result = ""; | |
var ignore = ['a', 'e', 'i', 'o', 'u']; | |
for (var i = 0; i < str.length; i++) { | |
if (ignore.indexOf(str(i)) === -1) { | |
result += str(i); | |
} | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment