mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-22 12:32:09 +03:00
Quote this keyword in explanation (#4862)
This commit is contained in:
parent
8a7cdc171f
commit
4fafc29666
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user