Matching classes querySelector
class exactly matches abc
const exactAbc = document.querySelectorAll("[class='abc']")
ts
class begins with abc
const containsAbc = document.querySelectorAll("[class*='abc']")
ts
class contains white-space separated word exactly matching abc
const containsAbc = document.querySelectorAll("[class~='abc']")
ts
class ends with abc
const endsWithAbc = document.querySelectorAll("[class$='abc']")
ts