nit: wouldn't parentheses around `(hiddenContainers.length - 1)`, a bit more readable