Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit deb3c1e

Browse filesBrowse files
committed
Improve task texts
1 parent 8c542b3 commit deb3c1e
Copy full SHA for deb3c1e

File tree

Expand file treeCollapse file tree

4 files changed

+12
-13
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+12
-13
lines changed

‎JavaScript/Tasks/1-promisify-problem.js

Copy file name to clipboardExpand all lines: JavaScript/Tasks/1-promisify-problem.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use strict';
22

3-
// Task: implement cancel passing `timeout` as an option
4-
// to promisified function (last argiment instead of callback)
3+
// Task: implement a cancelable promise by passing `timeout: number`
4+
// as an option to the promisified function (last argument,
5+
// replacing the callback).
56

67
const promisify = (fn) => (...args) => {
78
const promise = new Promise((resolve, reject) => {

‎JavaScript/Tasks/2-abort-problem.js

Copy file name to clipboardExpand all lines: JavaScript/Tasks/2-abort-problem.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
// Task: implement cancel passing `AbortSignal` as an option
4-
// to promisified function (last argiment instead of callback)
5-
// Hint: create `AbortController` or `AbortSignal` in usage section
3+
// Task: implement cancellation by passing `AbortSignal` as an option
4+
// to the promisified function (last argument, replacing the callback).
5+
// Hint: Create `AbortController` or `AbortSignal` in the usage section.
66

77
const promisify = (fn) => (...args) => {
88
const promise = new Promise((resolve, reject) => {

‎JavaScript/Tasks/3-iterator-problem.js

Copy file name to clipboardExpand all lines: JavaScript/Tasks/3-iterator-problem.js
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
'use strict';
22

3-
// Task: In usage section we have 3 blocks of code (in iife wrappers)
4-
// with async iterators generated from single `Timer` instance.
5-
// The prombem is: first and second blocks does not iterate,
6-
// just last one works as of now. Fix this to allow all blocks iterate
7-
// in parallel.
3+
// Task: ensure all blocks of code in the usage section iterate in parallel.
4+
// Currently, only the last block (of 3) works. Fix this issue so that
5+
// all blocks can iterate concurrently using a single `Timer` instance.
86

97
class Timer {
108
#counter = 0;

‎JavaScript/Tasks/4-hardcode-problem.js

Copy file name to clipboardExpand all lines: JavaScript/Tasks/4-hardcode-problem.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
// Task: refactor `Timer` to make event name (`step` in example)
4-
// configurable (not hardcoded into `Timer`)
5-
// Hint: you need Node.js >= v19.0.0
3+
// Task: refactor `Timer` to make the event name configurable
4+
// (e.g., 'step' in the example) and not hardcoded into the `Timer`.
5+
// Hint: You need Node.js >= v19.0.0
66

77
class Timer extends EventTarget {
88
#counter = 0;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.