Open in app
Gajus Kuizinas
6.8K Followers
About

Sign in

6.8K Followers
About
Open in app

…unction constructor is used to create a function that returns a closure that has access to formats, but not to anything else:

Eval is Evil, But Not Why You May Think
6
3

Evgeny Poberezkin

Gajus Kuizinas

Gajus Kuizinas

Sep 10, 2016·1 min read

Thats not true — Function constructor has access to global variables (as seen in the screenshot you have shared).

However, at least in Node.js, you can use https://nodejs.org/api/vm.html to create a completely new execution context.

Written by

Gajus Kuizinas

Software architect, startup adviser. Editor of https://medium.com/applaudience. Founder of https://go2cinema.com.

More from Gajus Kuizinas

Software architect, startup adviser. Editor of https://medium.com/applaudience. Founder of https://go2cinema.com.

More From Medium

Ultimate guide to concurrent logging in Node.js

Gajus Kuizinas in ITNEXT

Onboarding email with 80% response rate

Gajus Kuizinas

Dynamically generating SQL queries using Node.js

Gajus Kuizinas in JavaScript In Plain English

Traveling and working remotely from Japan. 20 oddities

Gajus Kuizinas

A declarative way to cache PostgreSQL queries using Node.js

Gajus Kuizinas in The Startup

Pre-loading cache

Gajus Kuizinas

Ensuring healthy Node.js program using watchdog timer

Gajus Kuizinas in Level Up Coding

Lessons learned scaling PostgreSQL database to 1.2bn records/ month

Gajus Kuizinas

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store