mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-06 23:06:49 +02:00
Quote this keyword in explanation (#4862)
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user