• Home
  • About
  • Downloadables
  • Weightloss for Recessive Times

Kibo …

… keeping meat fresh since 1970

Feed on
Posts
Comments

isInArray()

May 17th, 2005 by Intermanaut

If you want to check whether a particular value is in an array, call this function with something like this.

if (isInArray(MyValue, MyArray))

<script type=”text/javascript”>

<!–

function isInArray(needle, arrayHaystack)

{

for (x=0; x < arrayHaystack.length; x++)

if (arrayHaystack[x] == needle)

return true;

return false;

}

–>

</script>

Posted in JavaScript | No Comments

Comments are closed.

  • Recent Posts

    • Kids & Boredom
    • Robin Hood
    • Why should Facebook be responsible for what your kids do on-line?
    • Hot Tub Time Machine
    • Data Back-up and The Cloud
  • Things

    • About
    • Addresses worth banning from your forum
    • Downloadables
    • Foamcore Macro Studio
    • Multiplicity: Pouring yourself a beer
    • Multiplicity: The five of me
    • Ross on Wye: What a Mess
    • Weightloss for Recessive Times
  • Stuff

    • Conversations (22)
    • Movies (15)
    • Programming (12)
      • ASP (3)
      • JavaScript (6)
      • PHP (2)
      • VBA (1)
    • Rambles (262)
      • Angry (47)
      • Happy (21)
    • Blogroll

      • 1 city, 2 people, 24 hours
      • del.icio.us
      • EmmieJay - guilt-free style
      • flickr

Kibo … © 2010 All Rights Reserved.

MistyLook made free by Web Hosting Bluebook