---
title: "Discussion on \"How does this keyword in JavaScript work?\" | Hashnode"
description: "Discussion on \"How does this keyword in JavaScript work?\". The JavaScript this keyword refers to the object it belongs to. It has different values depending on where it is used. In a method, this refers to the owner object. Alone, this refers to the global object. In a function, this refers to the global obj..."
url: "https://hashnode.com/posts/how-does-this-keyword-in-javascript-work/610ffdef528eff11aea8b42d"
---

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

Discussion

# [How does this keyword in JavaScript work?](https://blog.vicentereyes.org/how-does-this-keyword-in-javascript-work?utm_source=hashnode&utm_medium=feed)

The JavaScript this keyword refers to the object it belongs to. It has different values depending on where it is used. In a method, this refers to the owner object. Alone, this refers to the global object. In a function, this refers to the global obj...

Apr 15, 2019 · 1 min read · blog.vicentereyes.org  
Updated Apr 29, 2023  
Read the article

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

## Written by

[Vicente Reyes](https://hashnode.com/@vgreyes)

@vgreyes · MNL

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

Web Developer | Technical Writer | OSS Contributor | Musician | Gamer

Python Developer | Audio Editor | Technical Writer | OSS Contributor | Tag Moderator @ @ThePracticalDEV | Valorant TonyPoppins #881488

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
