---
title: "Discussion on \"All about `this` in JavaScript\" | Hashnode"
description: "Discussion on \"All about `this` in JavaScript\". What is this?\nIt depends on the situation. Let’s look at a few common scenarios.\nThe global this\nOutside of a function, this references the global object. In a browser environment, this is typically the window object. In this scenario, you can set pr..."
url: "https://hashnode.com/posts/all-about-this-in-javascript/5f4853593ba45c3bb00ee987"
---

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

Discussion

# [All about \`this\` in JavaScript](https://joeattardi.dev/all-about-this-in-javascript?utm_source=hashnode&utm_medium=feed)

What is this? It depends on the situation. Let’s look at a few common scenarios. The global this Outside of a function, this references the global object. In a browser environment, this is typically the window object. In this scenario, you can set pr...

Aug 28, 2020 · 7 min read · joeattardi.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Joe Attardi](https://hashnode.com/@joeattardi)

@joeattardi · Boston Area, MA, USA

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

Veteran Software Developer | Web & Front-End Expert | Author | Tech Writer | Blogger

Software developer since 2004. Web/front-end expert (HTML, CSS, JS). O'Reilly and Apress author. Freelance tech writer. Blogger. Bridging code and communication in tech.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
