18. A computer program product for replacing JAVASCRIPT global variables with local variables in a software code to optimize usage of computing resources, comprising: a non-transitory computer readable storage medium; first program instructions for receiving a JAVASCRIPT code having at least one of a plurality of globally defined functions; second program instructions for generating at least one call flow graph for each one of said at least one of globally defined functions; third program instructions for generating an inter-procedural control flow graph for each one of said call flow graph; fourth program instructions for generating an inter-procedural dominator graph for each one of said inter-procedural control flow graph; fifth program instructions for identifying each of referenced global variables within each of said inter-procedural dominator graph and determining a JAVASCRIPT scope of each of said referenced global variables; sixth program instructions for identifying at least one of: one or more confined global variables which receive a value within a first JAVASCRIPT scope wherein said value is not referenced outside of said first JAVASCRIPT scope, and one or more repeating global variables accessed repeatedly within a second JAVASCRIPT scope; and seventh program instructions for automatically adding local variables in place of said repeating global variables and/or said confined global variables; and wherein said first, second, third, fourth, fifth, sixth, and seventh program instructions are executed by at least one processor from said non-transitory computer readable storage medium.
18. A computer program product for replacing JAVASCRIPT global variables with local variables in a software code to optimize usage of computing resources, comprising: a non-transitory computer readable storage medium; first program instructions for receiving a JAVASCRIPT code having at least one of a plurality of globally defined functions; second program instructions for generating at least one call flow graph for each one of said at least one of globally defined functions; third program instructions for generating an inter-procedural control flow graph for each one of said call flow graph; fourth program instructions for generating an inter-procedural dominator graph for each one of said inter-procedural control flow graph; fifth program instructions for identifying each of referenced global variables within each of said inter-procedural dominator graph and determining a JAVASCRIPT scope of each of said referenced global variables; sixth program instructions for identifying at least one of: one or more confined global variables which receive a value within a first JAVASCRIPT scope wherein said value is not referenced outside of said first JAVASCRIPT scope, and one or more repeating global variables accessed repeatedly within a second JAVASCRIPT scope; and seventh program instructions for automatically adding local variables in place of said repeating global variables and/or said confined global variables; and wherein said first, second, third, fourth, fifth, sixth, and seventh program instructions are executed by at least one processor from said non-transitory computer readable storage medium. 19. The computer program of claim 18 , further comprising program instructions for identifying at least one or more of said repeating global variables along paths of said inter-procedural dominator graph.