openThisAccordian = el => (el.getElementsByClassName('collapse')[0]).classList.toggle('in'); code example
Example: document getelementsbyclassname not getting all elements
//use this instead
document.querySelectorAll(".myclassname");
//use this instead
document.querySelectorAll(".myclassname");