Here is a scenario where I have an original set of functions :
<script>
function f(x){..}
function z(x){..}
...
</script>
Additional functions are then dynamically loaded via AJAX :
<script>
function xyz(){..}
windows.abc(){..}
...
</script>
The challenge now is how to remove ALL functions that are attached to the "this" and "windows" scope, except for the original ones (in this case f(x), z(x)). Since new functions will be added dynamically in the future, the solution needs to be flexible. One approach could involve storing the names of the original functions and making sure they are not deleted during a loop that targets all other functions.