I have an object like this.
objName {
item1 : someItem,
item2 : someItem,
item3 : someItem,
}
Now the number of property is dynamic and can be increase in unknown amount, I am performing a foreach loop in the property key on this object like this.
Object.keys(objName).forEach(itemNumber => {
console.log(itemNumber);
});
How am I going to detect the very last iteration of it to perform a new task?