I want to check if the classList contains 'active' and add class to a container, so here i want to break the loop if the 1st element contains the class, and not loop through all the element