minor fixes
This commit is contained in:
parent
edef0b4306
commit
1273ae44e3
1 changed files with 3 additions and 3 deletions
|
@ -32,11 +32,11 @@ user.sayHi = function() {
|
||||||
user.sayHi(); // Hello!
|
user.sayHi(); // Hello!
|
||||||
```
|
```
|
||||||
|
|
||||||
Here we've just used a Function Expression to create the function and assign it to the property `user.sayHi` of the object.
|
Here we've just used a Function Expression to create a function and assign it to the property `user.sayHi` of the object.
|
||||||
|
|
||||||
Then we can call it. The user can now speak!
|
Then we can call it as `user.sayHi()`. The user can now speak!
|
||||||
|
|
||||||
A function that is the property of an object is called its *method*.
|
A function that is a property of an object is called its *method*.
|
||||||
|
|
||||||
So, here we've got a method `sayHi` of the object `user`.
|
So, here we've got a method `sayHi` of the object `user`.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue