/*Downloaded from https://www.codeseek.co/carberrie/ejercicio-2-xqeKbw */
/*Downloaded from https://www.codeseek.co/carberrie/ejercicio-2-xqeKbw */
var matriz = [["a","b","c","d"], ["e","f","g","h"], ["i","j","k","l"], ["m","n","o","p"]];
//Funcion que recorre el arreglo y reversa elementos en determinados índices.
function serpiente(matriz) {
var sumaMatriz = (matriz[0].join("") + matriz[1].reverse().join("") + matriz[2].join("") + matriz[3].reverse().join("") );
return sumaMatriz;
}
document.write(serpiente(matriz));