codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Function help needed  SusieQ at 10:59 on Tuesday, June 15, 2004
 

Hi I've just started to learn JavaScript and thought I was doing okay but I'm totally stumped at the moment. I would be grateful for any help provided on the following:

I've added the followng function (isVowel) to a function library and have to create a new function called dropVowel, which makes use of this function.

I have to declare a variable called resultString and assign it to an ampty string, then use a for statement to access each character of the string in turn. Within the for statement I need to add an if statement to check if the current character is a vowel. If not a vowel, it is to be added to the varaible resultString.

function isVowel(aCharacter)
{
return ((aCharacter == 'a') || (aCharacter == 'A')||
(aCharacter == 'e') || (aCharacter == 'E')||
(aCharacter == 'i') || (aCharacter == 'I')||
(aCharacter == 'o') || (aCharacter == 'O')||
(aCharacter == 'u') || (aCharacter == 'U'))
}

I've read and re-read the instructions but just can't seem to make any headway. My brains turned to musg becasue I am trying to pack up smoking, so thats my excuse lol.

Thanks for your help!!

Regards
Sue

  Re: Function help needed  SusieQ at 22:54 on Thursday, June 17, 2004
 

Wow I finally managed to write the function and get it working - I was missing the ! operator. It feels great to have worked it out :)







CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Function help needed
•  Export data to word and create header and footer
•  calling Functions from VC .LIB Files inside VB
•  calling Functions from VC .LIB Files inside VB
•  Re: Auto-Populating fields in a form
•  Problem ocureed when i placed my working folder up to the server
•  Problem occured when i placed my working up to the server
•  need to reset array length to zero
•  tellafriend


Recent Articles
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)
Function to Return Alpha Characters Only
The OSI Reference Model - A Clear and Concise Illustration !
Understanding Pointers to Functions in C
Application & Session Events in the Global.asax File
Socket Programming in Perl


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2004