954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Searching an array for an existing name

I am trying to write a piece of code that will search an existing array of usernames and see if the name entered by a user (which will be in a prompt box) is in that array of user names and if so then ask them for their password. I'm not sure if I use a for loop to check through the array of usernames and then use an expression saying if the user name entered is equal to one of the names in the array, or am I completely on the wrong tracks?? As you can tell I'm very new to javascript and any help would be greatly appreciated
Thanks.

ramp12
Newbie Poster
1 post since May 2008
Reputation Points: 10
Solved Threads: 0
 

First of all this is a java forum. Java and javascript are entirely different.
If the users in the array are not sorted then you are right on how to do it.

javaAddict
Nearly a Senior Poster
Team Colleague
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You