I'm taking a course that uses the queryselectorall tool, and I was a doubt about his statement! The space between .seat.selected produces the desired effect
function updateSelectedCount() {
const selectedSeats = document.querySelectorAll('.row .seat.selected')
const selectedSeatsCount = selectedSeats.length
console.log(selectedSeatsCount)
}
But if I put a space between them,nothing happens
function updateSelectedCount() {
const selectedSeats = document.querySelectorAll('.row .seat .selected')
const selectedSeatsCount = selectedSeats.length
console.log(selectedSeatsCount)
}
the space between classes does what in the code?