Event problem - calculator - RESOLVES

Event problem - calculator - RESOLVES
0

#1

Hi,
I try to clear my screen, with a button clear, but my variable still full of date:

  clear = document.querySelector('.clear-item  span')
  clear.addEventListener('click', function(e) {
    //console.log(e);
    screen.innerHTML = ''
    for (let i = 0, l = arr.length; i < l; i++) {
      let v = arr[i];
      arr.pop()
    }
    console.log(arr);
    //e.preventDefault();
  });

the Codepen here:

Thanks


#2

I add
printCalcul =’'
and it works