Loop JavaScript Dernière index
for (const [i, value] of arr.entries()) {
if (i === arr.length - 1) {
// do your thing
}
}
Lokesh003Coding
for (const [i, value] of arr.entries()) {
if (i === arr.length - 1) {
// do your thing
}
}