I have the below code to find elements with their class name:
// Get the element by their class name
var cur_columns = document.getElementsByClassName(\'colu
I prefer using forEach over for/while looping. In order to use it's necessary to convert HTMLCollection to Array first:
Array.from(document.getElementsByClassName("post-text"))
.forEach(element => element.remove());
Pay attention, it's not necessary the most efficient way. Just much more elegant for me.