Quote this keyword in explanation (#4862)

This commit is contained in:
Federico 2024-03-14 02:40:43 +01:00 committed by GitHub
parent 8a7cdc171f
commit 4fafc29666
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -405,7 +405,7 @@ myObj = {
};
myObj.myFunc(); // = "Hello world!"
// What this is set to has to do with how the function is called, not where
// What `this` is set to has to do with how the function is called, not where
// it's defined. So, our function doesn't work if it isn't called in the
// context of the object.
var myFunc = myObj.myFunc;