queryselectorall array code example
Example 1: javascript select element with attribute
document.querySelectorAll('[attrname="value"]');
Example 2: queryselectorall in javascript to get data attribute value
//javascript get html data attribute
Example 3: javascript querySelectorAll to array
const spanList = [...document.querySelectorAll("span")];