3 Replies Latest reply on Nov 9, 2010 7:56 PM by celebritymusic

    Array question - basic, but I'm a bit lost

    celebritymusic Level 1



      I want to check a string I have obtained against strings in an array, and if it matches any of them, take action.


      So if I have:


      var stringToCheck:String = "check me please";


      var checkArray:Array = new Array("blah1", "blah2", "check me please");


      ...what's the most efficient way of checking stringToCheck against the strings in the array, and if it matches, then trace("wahoooo");


      Thanks for your help.