tiny edits to javascript bind usage article

This commit is contained in:
James Fenn
2023-03-16 18:00:45 -04:00
parent aff13cd746
commit 33e380d181

View File

@@ -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) {