minor
This commit is contained in:
parent
1268643c6a
commit
3dd8ca09c1
1 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ It's common that an object method needs to access the information stored in the
|
|||
|
||||
For instance, the code inside `user.sayHi()` may need the name of the `user`.
|
||||
|
||||
**To access the object, a method can use the `this` keyword.**
|
||||
**To access the object, a method can use `this` keyword.**
|
||||
|
||||
The value of `this` is the object "before dot", the one used to call the method.
|
||||
|
||||
|
@ -167,7 +167,7 @@ If we used `this.name` instead of `user.name` inside the `alert`, then the code
|
|||
|
||||
## "this" is not bound
|
||||
|
||||
In JavaScript, the "this" keyword behaves unlike most other programming languages. It can be used in any function.
|
||||
In JavaScript, keyword `this` behaves unlike most other programming languages. It can be used in any function.
|
||||
|
||||
There's no syntax error in the following example:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue