View Single Post
  #15 (permalink)  
Old Jul 5th, 2004, 04:47
jamslam jamslam is offline
Up'n'Coming Member
Join Date: Oct 2003
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
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...