How to write an if statment where an array is empty

Ok I’m trying to write an if statement say that if the array is empty goto frame 1. I’m trying different things for this and I cant seem to get it. The only thing i can get so far is this…



if(myArray.length = -1){
   _root.gotoAndPlay(1);
   trace(myArray);
}

But that doesnt work, cause when you click the button even if the array isnt empty it still takes you to frame 1 :S. Can someone please help me.