---
title: "Discussion on \"JavaScript Auto-bound behavior of arrow functions\" | Hashnode"
description: "Discussion on \"JavaScript Auto-bound behavior of arrow functions\". Consider\nclass c {\n    a=1;\n\n  autoBound = () => {console.log(this.a);}\n}\n\nconst C=new c();\n\nconst {autoBound}=C;\nconsole.log(autoBound);\nautoBound();\n\nOutput\n() => {console.log(this.a);}\n1\nAs you can see, even when autoBound has been extracted out f..."
url: "https://hashnode.com/posts/javascript-auto-bound-behavior-of-arrow-functions/6354c383db71c42f89e387ff"
---

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

Discussion

# [JavaScript Auto-bound behavior of arrow functions](https://loganlee.hashnode.dev/javascript-auto-bound-behavior-of-arrow-functions?utm_source=hashnode&utm_medium=feed)

Consider class c { a=1; autoBound = () => {console.log(this.a);} } const C=new c(); const {autoBound}=C; console.log(autoBound); autoBound(); Output () => {console.log(this.a);} 1 As you can see, even when autoBound has been extracted out f...

Oct 23, 2022 · 1 min read · loganlee.hashnode.dev  
Read the article

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

## Written by

[Logan Won-Ki Lee](https://hashnode.com/@loganlee)

@loganlee

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

Linux programmer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
