I have the following tags:
<script>//<script/>
<script>
//
</script>
<script>//testing testing<script/>
how can i check and remove the script tag that has "//" only and not additional text or code.
const element = document.getElementsByTagName("script");
const arr = [...element];
arr.forEach(el =>{
if(el.innerHTML === '//'){
el.parentElement.removeChild(el)
}
})
i guess this should work