I have tried to find all Global Variable available in my site. To avoid memory leak issue I am planning to dump all global variable to limited scope.
But I am not able to find any generic function when I can find all global variables created in files.
For Example:
<script>
var abc = 3;
var xyz = 5;
</script>
I have to manually find like this:
I have tried to use Object.keys( window );
, but it returns all variables which are provided by browser and core JavaScript also.
I wanted only those variable which are declared in JavaScript files.