I need your help as soon as possible, I have an exercise that consists of identifying the "number of characters" of 5 paragraphs and determine which is the paragraph that has the most number of letters through an Alert (); I was able to determine the number of letters in each paragraph and compare them, as well as show through the Alert (); the greater amount of letters, BUT, I can not show WHAT is the paragraph, that is, if the I, II, III, IV or V. I would appreciate your help, I attach my code.
function identificar () {
let parrafo = document.querySelector('#parrafo').innerHTML.length;
alert ('El tamaño del parrafo I es de ' + parrafo + ' caracteres');
let parrafo2 = document.querySelector('#parrafo2').innerHTML.length;
alert ('El tamaño del parrafo II es de ' + parrafo2 + ' caracteres');
let parrafo3 = document.querySelector('#parrafo3').innerHTML.length;
alert ('El tamaño del parrafo III es de ' + parrafo3 + ' caracteres');
let parrafo4 = document.querySelector('#parrafo4').innerHTML.length;
alert ('El tamaño del parrafo IV es de ' + parrafo4 + ' caracteres');
let parrafo5 = document.querySelector('#parrafo5').innerHTML.length;
alert ('El tamaño del parrafo V es de ' + parrafo5 + ' caracteres');
let comparar = [parrafo, parrafo2,parrafo3,parrafo4,parrafo5];
let Parrafomayor = 0;
for (i = 0; i < comparar.length; i++) {
if (comparar[i] > Parrafomayor) {
Parrafomayor = comparar[i];
}
}
alert ('El Parrafo con mayor cantidad de caracteres es el número: ' + Parrafomayor);
}
SHOWS ME THE AMOUNT OF LETTERS OF THE PARAGRAPH, but does not tell me what the Paragraph is.