I'm trying to develope javascript code that matches every Span Tag with with the classname 'a-size-base a-color-price s-price a-text-bold' and returns in an Array the innerhtml of it. So basically I need the price of every spam in an array list.
Can somebody show me how to do this because I have no idea how to put the match function with the classname together and take the innerHTML of it.
<span class="a-size-base a-color-price s-price a-text-bold">EUR 16,90</span>
<span class="a-size-base a-color-price s-price a-text-bold">EUR 20,09</span>
<span class="a-size-base a-color-price s-price a-text-bold">EUR 19,90</span>
<span class="a-size-base a-color-price s-price a-text-bold">EUR 12,90</span>
var prices = [...document.querySelectorAll('span.a-size-base')].map(el => el.textContent.split(' ')[1]);