mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-10 04:22:06 +00:00
tiny edits to javascript bind usage article
This commit is contained in:
@@ -100,7 +100,7 @@ It will `console.log` "You eat the chili. Spicy!".
|
|||||||
|
|
||||||
Makes sense, right?
|
Makes sense, right?
|
||||||
|
|
||||||
Now, what do you think will happened if I do the following?
|
Now, what do you think will happen if I do the following?
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
cup = new Cup();
|
cup = new Cup();
|
||||||
@@ -111,7 +111,7 @@ cup.consume = bowl.consume;
|
|||||||
cup.consume();
|
cup.consume();
|
||||||
```
|
```
|
||||||
|
|
||||||
While you might think that it would log `"You eat the chili. Spicy!"`, it doesn't! Instead, it logs: `"You drink eat the water. Spicy!"`.
|
While you might think that it would log `"You eat the chili. Spicy!"`, it doesn't! Instead, it logs: `"You eat the water. Spicy!"`.
|
||||||
|
|
||||||
Why?
|
Why?
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ We can then think of your browser calling an event on `button` to look something
|
|||||||
```javascript
|
```javascript
|
||||||
/**
|
/**
|
||||||
* This is a representation of what your browser is doing when you click the button.
|
* This is a representation of what your browser is doing when you click the button.
|
||||||
* This is NOT how it really works, just an explainatory representation
|
* This is NOT how it really works, just an explanatory representation
|
||||||
*/
|
*/
|
||||||
class HTMLElement {
|
class HTMLElement {
|
||||||
constructor(elementType) {
|
constructor(elementType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user