Skip to content

Commit 57dc058

Browse files
committed
typos
1 parent a4a16fc commit 57dc058

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

1-js/06-advanced-functions/09-call-apply-decorators/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ alert( worker.slow(1) ); // the original method works
106106
worker.slow = cachingDecorator(worker.slow); // now make it caching
107107

108108
*!*
109-
alert( worker.slow(2) ); // WOOPS! Error: Cannot read property 'someMethod' of undefined
109+
alert( worker.slow(2) ); // Whoops! Error: Cannot read property 'someMethod' of undefined
110110
*/!*
111111
```
112112

10-regular-expressions/08-regexp-greedy-and-lazy/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ alert( str.match(reg) ); // <a href="link" class="doc">
218218
let str = '...<a href="link1" class="doc">... <a href="link2" class="doc">...';
219219
let reg = /<a href=".*" class="doc">/g;
220220

221-
// Woops! Two links in one match!
221+
// Whoops! Two links in one match!
222222
alert( str.match(reg) ); // <a href="link1" class="doc">... <a href="link2" class="doc">
223223
```
224224

8-async/02-promise-basics/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Or, in case of an error:
4444
```js
4545
let promise = new Promise(function(resolve, *!*reject*/!*) {
4646
// after 1 second signal that the job is finished with an error
47-
setTimeout(() => reject(new Error("Woops!")), 1000);
47+
setTimeout(() => reject(new Error("Whoops!")), 1000);
4848
});
4949
```
5050

@@ -82,10 +82,10 @@ promise.then(result => alert(result));
8282

8383
```js run
8484
let promise = new Promise(function(resolve, reject) {
85-
setTimeout(() => reject(new Error("Woops!")), 1000);
85+
setTimeout(() => reject(new Error("Whoops!")), 1000);
8686
});
8787

88-
// shows "Woops!" after 1 second
88+
// shows "Whoops!" after 1 second
8989
promise.catch(error => alert(error.message));
9090
```
9191

8-async/03-promise-chaining/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ For instance:
212212

213213
```js run
214214
new Promise(function(resolve, reject) {
215-
throw new Error("Woops!");
215+
throw new Error("Whoops!");
216216
}).catch(function(error) {
217-
alert(error.message); // Whoops
217+
alert(error.message); // Whoops!
218218
});
219219

220220
## Inheriting from promise, thenables, error handling?
@@ -248,11 +248,11 @@ new Promise(function(resolve, reject) {
248248
setTimeout(() => resolve(1), 1000);
249249
}).then(function(result) {
250250
251-
throw new Error("Woops!");
251+
throw new Error("Whoops!");
252252
253253
}).catch(function(error) {
254254
255-
alert(error.message); // Woops!
255+
alert(error.message); // Whoops!
256256
257257
});
258258
```

0 commit comments

Comments
 (0)