---
title: "Comment by shuo yang on \"Unlocking the Power of JavaScript Closures\" | Hashnode"
description: "Why the new Function() constructor does not create a closure? IMO: every function in JS is a closure, the function created by new Function() has the global-env"
url: "https://hashnode.com/posts/unlocking-the-power-of-javascript-closures/648abf9ec834e3b417c9245c/comment/64be49a04d4ccf1030b10864"
---

[Discussion](https://hashnode.com/posts/unlocking-the-power-of-javascript-closures/648abf9ec834e3b417c9245c)

Comment [Unlocking the Power of JavaScript Closures](https://hashnode.com/posts/unlocking-the-power-of-javascript-closures/648abf9ec834e3b417c9245c)

[shuo yang](https://hashnode.com/@longxiakuangmo)

[Jul 24, 2023](https://hashnode.com/posts/unlocking-the-power-of-javascript-closures/648abf9ec834e3b417c9245c/comment/64be49a04d4ccf1030b10864)

Why the new Function() constructor does not create a closure?

IMO: every function in JS is a closure, the function created by new Function() has the global-env as it's outer environment
