Improved manipulation of a 2D array for a game map
I like your question, games are one the best ways to get to know a language better.

From a once over:


Unless you have other 2d searching needs elsewhere, I would have called indexOf2d as findRoomLocation
I would have made findRoomLocation a part of worldMap
You are both returning the found location with index and setting the globals outputA  and outputB. Setting those globals is considered very bad practice.
If you can exit early from loops (you could exit once you found a room), then I would advise against use some and go for for instead
Also, indexOf is slower than rolling your own search so I would use 2 old school loops

worldMap.findRoom2 = function( room ){
  var notFound = [-1, -1],
  row;

  if (!Array.isArray(this)) {
    return notFound;
  }

  for( var x = 0 , xLength = this.length ; x &lt; xLength ; x++ ) {
    row = this[x];
    if (!Array.isArray(row)) {
      continue;
    }    
    for( var y = 0 , yLength = row.length ; y &lt; yLength ; y++ ) {
      if( row[y] == room ){
        return [x,y];
      }
    } 
  }
  return notFound;
};


If this was for a personal non production project I would settle for something like this

worldMap.findRoom = function( room )
{
  var x = -1, y;
  while( this[y=-1,++x] )
    while( this[x][++y] )
      if( this[x][y] == room )
        return [x,y];
  return [-1,-1]; //Not found
};



All in all, I would counter propose something like this:

// noprotect
var room1 = [
    [1, 1, 1, 1, 1, 1, 1],
    [1, 1, 1, 1, 1, 1, 1],
    [1, 1, 1, 1, 1, 1, 1]
];

var room2 = [
    [2, 2, 2, 2, 2, 2, 2],
    [2, 2, 2, 2, 2, 2, 2],
    [2, 2, 2, 2, 2, 2, 2]
];

var room3 = [
    [3, 3, 3, 3, 3, 3, 3],
    [3, 3, 3, 3, 3, 3, 3],
    [3, 3, 3, 3, 3, 3, 3]
];

var room4 = [
    [4, 4, 4, 4, 4, 4, 4],
    [4, 4, 4, 4, 4, 4, 4],
    [4, 4, 4, 4, 4, 4, 4]
];

var worldMap = [
    [room1, room2],
    [room3, room4]
];

var outputA;
var outputB;
var currentMap = room2;

worldMap.findRoom = function( room ){
  var notFound = [-1, -1],
      row;
  
  if (!Array.isArray(this)) {
        return notFound;
  }
  
  for( var x = 0 , xLength = this.length ; x &lt; xLength ; x++ ) {
    row = this[x];
    if (!Array.isArray(row)) {
        continue;
    }    
    for( var y = 0 , yLength = row.length ; y &lt; yLength ; y++ ) {
      if( row[y] == room ){
        return [x,y];
      }
    } 
  }
  return notFound;
};

worldMap.findRoomAlt = function( room )
{
  var x = -1, y = 0;
  while( this[y=-1,++x] )
    while( this[x][++y] )
      if( this[x][y] == room )
        return [x,y];
  return [-1,-1]; //Not found
};

worldMap.findNextRoom = function( directionName ){
  //dx & dy -&gt; Delta on x and y axis
  var directions = {
    down : {  dx : 1 , dy : 0 }  
  };
  var direction = directions[directionName];
  //Paranoia
  if(!direction){
    //Do something, I would actually throw an error
  }
  
  var location = this.findRoom(currentMap);
  location[0] += direction.dx;
  location[1] += direction.dy;
  return this[location[0]][location[1]];
};

// show the existing currentMap
console.log('existing currentMap = ' + currentMap);

// get the index of the currentMap within the worldMap
console.log(worldMap.findRoom(currentMap));

// use the index value outputs to calculate the next room 'down' the worldMap array

console.log('next room down: ' + worldMap.findNextRoom('down'));

currentMap = worldMap.findNextRoom('down');
console.log('new currentMap = ' + currentMap);