mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-05-21 13:50:58 +00: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!"
|
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
|
// it's defined. So, our function doesn't work if it isn't called in the
|
||||||
// context of the object.
|
// context of the object.
|
||||||
var myFunc = myObj.myFunc;
|
var myFunc = myObj.myFunc;
|
||||||
|
Loading…
Reference in New Issue
Block a user