This code works for the most part, changing display of elements according to their array value according to the classname. The result on the page worked for the most part b