+ 1
Why function does't work?
"Undo" function doesn't work properly. https://code.sololearn.com/W1bQLVfUch1c/?ref=app
1 ответ
+ 4
I think you need to use counter-1 in the undo-function for indexing:
undo.onclick= function(){
if(last[counter-1].innerHTML!="")
last[counter-1].innerHTML="";
counter--;
}