Open obriensystems opened 2 months ago
function render() { source = "obrienlabs"; target = "";//VEsNa"; split = ['Ve','Es','Na']; globalFound = false; source = source.toUpperCase(); let adjacent = []; // initialize arrays for(x=0;x<source.length;x++) { adjacent[x] = []; } // get adjacency matrix in 2 phases 1 char, 2 char) for (x=0; x<source.length; x++) { for (y=0; y<multiarray.length; y++) { current = source[x].toUpperCase(); element = multiarray[y][1]; if(element.toUpperCase() == current) { //document.write(element); adjacent[x][y] = element; } if(x + 1 < source.length) { current = source[x].toUpperCase() + source[x+1].toUpperCase(); alert(current); if(element.toUpperCase() == current) { //document.write(element); adjacent[x][y] = element; } } } }