How to add a value of a variable to name of another one?

后端 未结 0 927
野的像风
野的像风 2020-12-02 18:07

I have the following JS code:

let itemsCount = 1;

addButton.onclick = () => {

    itemsCount++;

    let newElement + ${itemCount} = document.createEleme         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题