I am trying to get this code to calculate the total for my shopping cart project, but it just concatenates the two prices together
I tried making separate variables but it didn't work.
document.querySelector('.totalBtn').addEventListener('click', fillTotal);
function fillTotal(){
let a = document.querySelector('.landingHempOil').innerHTML;
let b = document.querySelector('.fishOilLanding').innerHTML;
document.querySelector('.totalLanding').innerHTML= a + b;
}
What happens is the total shows the two concatenated next to each other rather than adding the two prices together. how could I do this better?