Why is this fuction not working well[solved]
var as = prompt("escribe la poscición en el array a"); var bs = prompt("escribe la poscición en el array b"); function comp (a, b) { comp (as,bs); var arr1 = [10-6,7*4, 3+2]; var arr2 = [1,3,5,7]; if (arr1[a] > arr2[b]) { document.write("El primer elemento de arr1 es mayor que el primero de arr2"+"<br>"); }else if(arr1[a] < arr2[b]){ document.write("El primer elemento de arr1 es menor que el primero de arr2"+"<br>"); }else{ document.write("El primer elemento de arr1 es igual que el primero de arr2"+"<br>"); } } ////maybe this code is so werid but it was an experiment. The user should put the number of the place of the array 1 and 2 and it will compare it but it don't shows nothing. I repeat maybe is a very werid code...