---
title: "Discussion on \"[JavaScript] Deep Dive into the THIS Keyword\" | Hashnode"
description: "Discussion on \"[JavaScript] Deep Dive into the THIS Keyword\". In this article, I will talk about how you can determine where this keyword points to."
url: "https://hashnode.com/posts/javascript-deep-dive-into-the-this-keyword/6467f1877b8b42fe31319926"
---

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

Discussion

# [\[JavaScript\] Deep Dive into the THIS Keyword](https://jaylog.hashnode.dev/javascript-deep-dive-into-the-this-keyword?utm_source=hashnode&utm_medium=feed)

In this article, I will talk about how you can determine where this keyword points to.

May 19, 2023 · 3 min read · jaylog.hashnode.dev  
Updated Nov 25, 2024  
Read the article

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

## Written by

[Lim Woojae](https://hashnode.com/@jaylog)

@jaylog · Sydney

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

Computer Science @UNSW

## Responses 1

Markdown supported · ⌘↵ to post

[shubham](https://hashnode.com/@shubham346)

[May 20, 2023](https://hashnode.com/posts/javascript-deep-dive-into-the-this-keyword/6467f1877b8b42fe31319926/comment/6468696105373f00453b03a8)

i think you code look wrong in this part

const obj = { name: "John Doe", myFunc() { printNmae: () => { console.log(this.name); } }, }; obj.printName() // ''

you can't access the printNmae , for accessing the printNmae you have to return it. just do

const obj={ name:"John Doe", myFunc(){ return { printNmae:()=>{console.log(this.name)} } } } obj.myFunc().printNmae();

[Lim Woojae](https://hashnode.com/@jaylog)

[May 20, 2023](https://hashnode.com/posts/javascript-deep-dive-into-the-this-keyword/6467f1877b8b42fe31319926/comment/6468696105373f00453b03a8#reply-6468e5ae689ece0aeed07ea8)

Got it :) thank you for pointing it out!
