I wonder how or if its possible to make these if and else criterias work? I dont know why this doesn't. Thanks for your Help
if (element > 9) {
Array.from(counter).forEach((element: HTMLElement, index) => {
console.log(index, element);
element.innerText = (index + 1).toString();
});
}else (element <== 9) {
Array.from(counter).forEach((element: HTMLElement, index) => {
console.log(index, element);
element.innerText = 0 + (index + 1).toString();
});
}
Aucun commentaire:
Enregistrer un commentaire