const listElements = document.getElementsByClassName('list-input')

function insertAfter(referenceNode, newNode) {
  referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
}


Array.from(listElements).forEach(input => {
    let add = document.createElement('button')
    console.log(input)
    add.innerHTML = '+'
    add.addEventListener('click', (e)=>{
        e.preventDefault()
        cloneInput = input.cloneNode(true)
        insertAfter(input, cloneInput)
    })
    insertAfter(input, add)
})

