im' making a memory game and try to collect all blocks that has a certain class name that i put after 2 cards are identical in an array I use this code
let matched = Array.from(document.getElementsByClassName("has-matched"));
console.log(matched);
the console shows the array is always empty even after two cards get the class name "has-matched"..