title: Typescript : Search if an array (row) exists in a 2D array
body: <p>I'm trying to check if an array of coordinates [x,y,z] exists in a 2D array of other coordinates [[x,y,z],[x',y',z'],..]. I wonder if <code>indexOf</code> can be used here. </p>
  
  <pre><code>var ALLcoordinates:number[][];
  ALLcoordinates = [];
  
  var coordinates: number[];
  coordinates = [alea1, alea2, alea3];
  
  
  for (var i=0; i&lt; dims; i++) {
      ALLcoordinates[i]=[];
      for (var j=0; j&lt;chainSize; j++){
          ALLcoordinates[i][j]=0;
      }
  }
  </code></pre>
  
  <p>So how can I make Typescript search "by rows"? Can I adapt <code>indexOf</code> for 2D arrays, or I do have to use loops? Here is my code, but I get quite an obvious error on data type : <em>"Argument of type 'number[]' is not assignable to parameter of type 'number'."</em></p>
  
  <pre><code>if (coordinates.indexOf(ALLcoordinates) == -1) {
  
          // do stuff
   }
  </code></pre>
  
  <p>I would be glad for any help or ideas, thanx!</p>