---
title: "Comment by Lisbeth Purrucker on \"How Functions Work in JavaScript and Variable Environment:\" | Hashnode"
description: "I think you have to correct your first assignment. In the text you say x = 1, but in your code snippet you assign x = 10."
url: "https://hashnode.com/posts/how-functions-work-in-javascript-and-variable-environment/63f7d7f05bcb7c8c399f81b0/comment/6404901a024dffb6cd377c2b"
---

[Discussion](https://hashnode.com/posts/how-functions-work-in-javascript-and-variable-environment/63f7d7f05bcb7c8c399f81b0)

Comment [How Functions Work in JavaScript and Variable Environment:](https://hashnode.com/posts/how-functions-work-in-javascript-and-variable-environment/63f7d7f05bcb7c8c399f81b0)

[Lisbeth Purrucker](https://hashnode.com/@lisbethpurrucker)

[Mar 5, 2023](https://hashnode.com/posts/how-functions-work-in-javascript-and-variable-environment/63f7d7f05bcb7c8c399f81b0/comment/6404901a024dffb6cd377c2b)

I think you have to correct your first assignment. In the text you say x = 1, but in your code snippet you assign x = 10.
