What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » if somthing is element of an array

if somthing is element of an array
Author: Message:
JonnyT
Junior Member
**


Posts: 28
Joined: Jun 2006
O.P. if somthing is element of an array
is there an easy way to do somthing like:

if Green is an element of the color array do somthing

or basicly searching an array

Thanks Jon
06-29-2006 10:03 PM
Profile E-Mail PM Find Quote Report
can16358p
Junior Member
**

WLM + MP!L User

Posts: 58
34 / Male / –
Joined: Oct 2005
Status: Away
RE: if somthing is element of an array
let arrays name  be colors, and you are searching for "green"
let exists be the boolean, if there is, it will be true.

var exists=false;
for(var i=0;i<colors.length;i++){
if(colors[i]=="green"){
exists=true;
}
}
[Image: anathema.gif][Image: hax0r.png]
06-29-2006 10:10 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On