📌  相关文章
📜  如何在javascript代码示例中动态提供id

📅  最后修改于: 2022-03-11 15:01:51.412000             🧑  作者: Mango

代码示例1
//Here the delete button gets a unique ID everytime, the ID is the array index of the element. 
array.forEach(function (element, index) {
      display =
        display +
        `
            ${index + 1}
            ${element.first}
            ${element.second}
            ${element.third}
            
        `;
    });