I cant figure out the problem here, save function doesn't change the target id innertext everthing matches

let previousLaps = document.getElementById("previous")
    let totalLaps = document.getElementById("count")

    let lapsCompleted = 0

    function increment() {
        lapsCompleted += 1;
        totalLaps.innerText = lapsCompleted;
    }


    function save() {
        previousLaps.innerText = lapsCompleted;
    }

Can you post your HTML too?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.