I have this code and I'm trying to select all the buttons with that same class
if (window.innerWidth < 768) {
document.querySelector(".product-info-button").innerHTML = "Product Info >";
} else {
document.querySelector(".product-info-button").innerHTML = "View Product Info >";
}
But I have no idea how to put a foreach in there.