---
title: "Discussion on \"Global vs globalThis in JavaScript\" | Hashnode"
description: "Discussion on \"Global vs globalThis in JavaScript\". JavaScript has an important concept called the global scope. When we declare a variable or function outside of any function or block, it becomes available in the global scope.\nThis global scope is rep"
url: "https://hashnode.com/posts/glabalobject/69b28a64f22e712aaa4f0190"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Global vs globalThis in JavaScript](https://piyushtiwari88.hashnode.dev/glabalobject?utm_source=hashnode&utm_medium=feed)

JavaScript has an important concept called the global scope. When we declare a variable or function outside of any function or block, it becomes available in the global scope. This global scope is rep

Mar 12 · 5 min read · piyushtiwari88.hashnode.dev  
Read the article

-   [#hiteshchaudhary](https://hashnode.com/tag/hiteshchaudhary)
-   [#piyushgarag](https://hashnode.com/tag/piyushgarag)
-   [#chaiaurcode](https://hashnode.com/tag/chaiaurcode)
-   [#globalobjects](https://hashnode.com/tag/globalobjects)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#chaicohort](https://hashnode.com/tag/chaicohort)

## Written by

[Piyush Tiwari](https://hashnode.com/@Peeyushtiwari)

@Peeyushtiwari · India

  
[View profile](https://hashnode.com/@Peeyushtiwari)

Aspiring software engineer | web development & GIT |B.Tech CSE ’28 | Frontend Developer (HTML, CSS, JS) | Tech Enthusiast |

Software Engineer | Passionate about Web Development, DSA &amp; Problem Solving. I write simple, practical tech blogs to help developers learn and grow. Exploring JavaScript, C++, Backend &amp; Modern Web Technologies.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
