You have this code:
- Code: Select all
function dropVowels(resultString)
{
var answer;
answer = dropVowels('This is a test');
document.write(answer);
}
And this code:
- Code: Select all
function dropVowels(resultString)
/*******************************************************/
/* This function takes a string as its argument and */
/* returns, as its result, a new string similar to the */
/* argument except that the vowels have been removed */
/*******************************************************/
{
var resultString; //local variable to hold the new string
resultString = '';
for (var resultString = 0; string < resultString.length; string++)
{
if (!isVowel(resultString.charAt(string)))
{
resultString = resultString + 1;
return resultString;
}
}
Two different functions with the same name.
I think it might be best if you post your
whole code...