'Change the style of an element in an array

how can I change the style of an element in an array? I've hidden the class "testimonial" in CSS before, now I want to display a single element of that class. I'm searching for something like this:

let test= document.getElementsByClassName("test");

test[0].style.visibility = "block";


Solution 1:[1]

You are right, only should use the correct css property (it's maybe the display:block, in javascript HTMLElementNodeList[<indexOfElement>].style.display="block")

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user17517503