In JavaScript, callback functions are a powerful concept used extensively in asynchronous programming. They allow us to execute code after certain events or tasks have completed. However, when using callback functions, it’s essential to understand how the context of `this` is handled. In this article, we will explore different approaches to access `this` inside a callback function in JavaScript.
(more…)
Tag: this
-
Understanding this Callback Functions in JavaScript
-
KnockoutJS Computed Observables
Computed Observables with Knockoutjs are functions that are dependent on one or more other observables, and will automatically update whenever any of these dependencies change.
- `this` context with ko computed observables and subscribe
- Creating a basic Knockout ViewModel
- Using this with a computed observable
- Writeable computed observations
- Accessing an Observable
- PureComputable Observables
- How dependency tracking works?
- Computed observations
- Determining if a property is a computed observable property
- Pure computed observations
-
PHP: self vs $this – what’s the difference?
This is a very unique topic that I found very interesting. Inside a class with PHP you can access a property or method by using either: self::myVariable or $this->myVariable. Let’s explore the unique difference, specifically with how it relates to polymorphism.