Drop-down selectors for state and city
Mixing English and Spanish in code is always awkward.  I don't recommend it.  If you must do it, though, try to be consistent, and avoid mixing in English identifiers like var cities.

The localidades array, in which the first string of each member array is special and represents a state, is weird.  An associative array, with the state names as keys, would be better.

In modern practice, the HTML should be free of all JavaScript, and the event hooks are added from the JavaScript.  addEventListener(), which allows the code to add multiple handlers, is preferable to window.onload = …, which only allows one handler.

The "Estado" and "Ciudad" placeholder options should be disabled to prevent them from being selected or submitted.

Below, I've defined a function, selectorDeEstadoYCiudad, which acts as a controller for the two drop-downs.



var localidades = {
  "Baja California": ["Tijuana","Rosarito","Ensenada","Tecate","Mexicali","San Felipe"],
  "Sonora": ["San Luis Río Colorado","Sonoita","Sásabe","Nogales","Naco","Agua Prieta"],
  "Chihuahua": ["El Berrendo","Puerto Palomas","San Jerónimo","Ciudad Juárez","El Porvenir","Ojinaga"],
  "Coahuila": ["Ciudad Acuña","Piedras Negras"],
  "Nuevo León": ["Colombia"],
  "Tamaulipas": ["Nuevo Laredo","Reynosa","Río Bravo","Nuevo Progreso","Matamoros"],
};

function selectorDeEstadoYCiudad(localidades, forma) {
  forma.state.addEventListener('change', function (e) {
    var cajon = forma.city;
    var ciudades = localidades[e.target.value];
    for (var i = 0; i &lt; ciudades.length; i++){
      cajon[i+1] = new Option(ciudades[i], ciudades[i]);
    }
    cajon.length = ciudades.length + 1;
    cajon.value = cajon[0].value;
  });
  
  var cajon = forma.state;
  for (var estado in localidades) {
    cajon.appendChild(new Option(estado, estado));
  }
}

window.addEventListener('DOMContentLoaded', function() {
  selectorDeEstadoYCiudad(localidades, document.getElementById('forma1'));
});
&lt;form id="forma1" action=""&gt;
  &lt;select name="state"&gt;
    &lt;option disabled&gt;Estado&lt;/option&gt;
  &lt;/select&gt;
  &lt;select name="city"&gt;
    &lt;option disabled&gt;Ciudad&lt;/option&gt;
  &lt;/select&gt;
&lt;/form&gt;