I'm curious about how to get these if and else conditions to function properly. It's frustrating that it's not working as expected. Any assistance would be greatly appreciated.
if (element > 9) {
Array.from(counter).forEach((element: HTMLElement, index) => {
console.log(index, element);
element.innerText = (index + 1).toString();
});
}else if (element <= 9) {
Array.from(counter).forEach((element: HTMLElement, index) => {
console.log(index, element);
element.innerText = '0' + (index + 1).toString();
});
}