document.querySelector('input[name="birthay.day"]').focus()
const massive = [
'Max download report 1',
'Felix download report 4',
'Roberto upload report 5',
'Alex download report 1',
'Stef download report 2',
'Sam download report 3',
'Monika upload report 54'
]
let count = 0,
max = 0; // Result
massive.forEach(str => {
if (str.includes('download')) {
count++;
} else {
if (count > max) max = count;
count = 0;
}
});
console.log(max);