With this Spartan, we can destructively disable all the links on the page.
(Or whatever link collection we feed the Fn.arg.)

function destroyLinks(a){
        while( a[0] ){ a[0].outerHTML = a[0].innerHTML };
        }

usage:

    destroyLinks( document.links );

Is it really safe to modify an array while looping through that array? Isn't there a chance that can turn into an infinite loop? If no, then nice, otherwise I prefer a for loop (personal choice).

Perfectly safe.
A DOM Collection, is not an Array.
Inerently -perfectly faster!

Member Avatar

Troy3

On behalf of Troy III:
"Have I been silently banned my Queen -
And why did my code-snip, end up in a regular thread?"