error 3
This commit is contained in:
@@ -326,14 +326,11 @@ const carpetasRepetidas = async () => {
|
||||
let repetidas = [];
|
||||
|
||||
for (let i = 0; i < carpetas.length; i++) {
|
||||
let aux = [carpetas[i]];
|
||||
for (let j = i + 1; j < carpetas.length; j++) {
|
||||
if (carpetas[i].name === carpetas[j].name) repetidas.push(carpetas[j]);
|
||||
else {
|
||||
repetidas.push(carpetas[i]);
|
||||
i = j - 1;
|
||||
break;
|
||||
}
|
||||
if (carpetas[i].name === carpetas[j].name) carpetas.push(carpetas[j]);
|
||||
}
|
||||
if (aux.length > 1) repetidas.push(aux);
|
||||
}
|
||||
console.log(carpetas.length);
|
||||
console.log(carpetas);
|
||||
|
||||
Reference in New Issue
Block a user