
I’m having trouble checking vowels in the array, if every 2 col and 2 row all the letters include vowels, then the output will be incremented, the example output from this image is 3,the first function is in charge of randomizing letters and inserting them into an array, then I have a problem in the next function, the next function is in charge of capturing the results of the first function and looking for vowels based on, 2 row and 3 col, if found then the output will be incremented.
function random(row,col) {
let hasil = []
let vrb = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for (let i = 0; i < row; i++) {
let temp = []
for (let j = 0; j < col; j++) {
temp.push(vrb.charAt(Math.floor(Math.random() * vrb.length)))
}
hasil.push(temp)
}
return hasil
}
// console.log(random(5,4));
function getBlock(vokal) {
let vrb = vokal.Map
// console.log(vrb);
}
console.log(getBlock([
['A', 'X', 'C', 'Y'],
['E', 'O', 'O', 'S'],
['I', 'U', 'I', 'N'],
['M', 'Y', 'O', 'E'],
['P', 'D', 'A', 'I']
]));

