function validateSecond(input) 270 { 271 //First, generate the array 272 let array = input.trim().split("\n"); 273 console.log("Parsing array"); 274 console.log(array); 275 for (let i = 1; i < array.length; ++i) 276 { 277 if (array[i].length !== array[0].length) 278 { 279 console.log("Invalid array"); 280 return "Arrays cannot have differing lengths."; 281 } 282 } 283 284 for (let i = 0; i < array.length - 1; ++i) 285 { 286 for (let j = 0; j < array[i].length - 1; ++j) 287 { 288 console.log("Checking " + array[i][j]); 289 if (isVowel(array[i][j]) && isVowel(array[i + 1][j]) && isVowel(array[i][j + 1]) && isVowel(array[i + 1][j + 1])) 290 { 291 return [i, j]; 292 } 293 } 294 } 295 return "None found." 296 }