I have a JavaScript code to filter some divs
with some buttons
, but I don't really understand what this piece of code means.
c.matches(`.${filters.join('.')}`)
The full code of that part is:
sheets.forEach((c) => {
if (filters.length === 0 || c.matches(`.${filters.join('.')}`)) {
c.classList.remove('hidden');
} else {
c.classList.add('hidden');
}
});