JavaScript
Wat is 'this' in JavaScript?
'this' wijst naar het object dat de functie aanroept.
'this' context
In object method: wijst naar het object In functie: wijst naar global (window/global) Arrow functions: inherit 'this' van parent scope .call(), .apply(), .bind() pas 'this' aan
Code Voorbeelden
JAVASCRIPT'this' voorbeelden✏️ Interactief
✏️CODE AANPASSEN
LIVE PREVIEW
Relevante trefwoorden
thisbindingcallapplybind