Direct `eval()` executes code within the current local scope, which means injected malicious code could read or modify local variables and sensitive data, bypassing intended access controls. `new Function()` typically executes in the global scope.
Open the full topic