Kali Baranwalkalibaranwal.hashnode.dev·Apr 30, 2024Exploring OOP Fundamentals: Part 4 BreakdownTHIS POINTER Its is a keyword which points to the objects which invokes the member function. It is used for return object. CODE: class A{ int a; public: void setdata(int a){ this->a=a; } void getdata(){ cout<<"the...Discussfriend function
Gaurav Goswamigauravgoswami.hashnode.dev·Apr 29, 2024What is `this`? 😵In English when we say this we are always referring to an object for example - this is a chair, here in this example chair is an object. Similarly in JavaScript, this refers to an object. If we have to define what is this we can say that this refers ...Discuss·52 readsthis keyword
Vikas singh varmavikas369.hashnode.dev·Apr 19, 2024This Keyword in Javascript'This' keyword depends on how and where a function is called. It acts like a chameleon, Adapting its meaning based on the context. This refers to an object that is executing the current function or code. Inside an Object method When 'This' is used wi...Discuss·20 likesJavaScript
Moniquectrlaltmonique.hashnode.dev·Apr 5, 2024Unexpected 'this'In the previous article, we delved into the four primary rules that dictate a this binding in JavaScript functions. While these rules generally provide a solid framework for understanding this behaviour, exceptions do exist. These exceptions can lead...Discussbinding-exceptions
Successedesuccess.hashnode.dev·Mar 30, 2024Understanding the JavaScript "this" keywordIntroduction There is no doubt that figuring out the value of "this" keyword in a function can be confusing most of the time. however, it becomes easier to understand when you take note of these five important rules. Implicit Binding const car = {...DiscussJavaScript
Jieun Leezeunny.hashnode.dev·Mar 14, 2024JavaScript: 어떤 방식으로 함수 정의하는 것을 선호하세요? - (2)함수 표현식 - Function Expression hello(); var hello = function greeting() { console.log('Hello world!'); } 변수에 함수를 할당해서 정의하는 방식을 함수 표현식이라고 한다. 그럼 함수 표현식도 함수 정의니깐 함수 호이스팅이 될까? 정답은 '안 된다'이다. 변수에 함수를 할당하는 것이기 때문에 변수 호이스팅 방식을 따라간다. 그래서 위의 코드를 실행하면 und...Discuss·33 readsJavaScript
justLifethingsjustlifethings.hashnode.dev·Feb 25, 2024Explained : Javascript 'this' keyword to a 12 year old!Hello, this is my first JS blog. Looking forward to the feedback. Please donot proceed if you are less than 12 year old. The concept of this has irritated me for a long time and messed up lot of my interviews. So I just tried to sit and console.log t...DiscussJavaScript
Vishal Kumargokuthecoder.hashnode.dev·Feb 16, 2024"this" keyword in javascriptMany student has different thought about "this" keyword, just like ''this'' keyword is only available in Regular Function but not in Arrow Function . But if you ask them to , what is the reason of this statement they don't know, so today i will dissc...Discussregularfunction
Nibu B Johnnibu.hashnode.dev·Feb 16, 2024Mastering Dart: A Deep Dive into 'this' KeywordIntroduction Welcome to our comprehensive guide on mastering Dart programming! In this blog post, we're about to dive deeply into one of Dart's essential keywords: 'this'. Don't worry if you're new to programming or if you find these concepts a bit i...DiscussDeveloper
Ankur Kashyapankur171.hashnode.dev·Jan 28, 2024bind method in JavaScriptlet name = { firstName: "Ankur", lastName: "Kashyap", printFullName: function() { console.log(this.firstName + " " + this.lastName); } }; const { printFullName, firstName, lastName } = name; consol...Discusscall apply and bind methods