---
title: "Comment by Sanjay Vyas on \"What is 'this' in JavaScript\" | Hashnode"
description: "It differs in node. this.count = 0; will not go to global dictionary, rather into the object for which the top level anonymous function is called. console.log(g"
url: "https://hashnode.com/posts/what-is-this-in-javascript/621f59b9aa0b9716581fa86b/comment/621fa2eaf1a32619afa39e90"
---

[Discussion](https://hashnode.com/posts/what-is-this-in-javascript/621f59b9aa0b9716581fa86b)

Comment [What is 'this' in JavaScript](https://hashnode.com/posts/what-is-this-in-javascript/621f59b9aa0b9716581fa86b)

[Sanjay Vyas](https://hashnode.com/@SanjayVyas)

[Mar 2, 2022](https://hashnode.com/posts/what-is-this-in-javascript/621f59b9aa0b9716581fa86b/comment/621fa2eaf1a32619afa39e90)

It differs in node.

this.count = 0; will not go to global dictionary, rather into the object for which the top level anonymous function is called.

console.log(global.count); // undefined console.log(this); // { count: 0 }

[Pranav Bakale](https://hashnode.com/@pranav1299)

[Mar 2, 2022](https://hashnode.com/posts/what-is-this-in-javascript/621f59b9aa0b9716581fa86b/comment/621fa2eaf1a32619afa39e90#reply-621fa45ef1a32619afa39efe)

Yes, it differs in node. Thank you so much for sharing this.
